KiCad PCB EDA Suite
class_dimension.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #ifndef DIMENSION_H_
31 #define DIMENSION_H_
32 
33 
34 #include <class_board_item.h>
35 #include <class_pcb_text.h>
36 #include <geometry/shape.h>
37 
38 
39 class LINE_READER;
40 class TEXTE_PCB;
41 class MSG_PANEL_ITEM;
42 
43 
45 enum class DIM_UNITS_FORMAT
46 {
47  NO_SUFFIX, // 1234.0
48  BARE_SUFFIX, // 1234.0 mm
49  PAREN_SUFFIX // 1234.0 (mm)
50 };
51 
54 {
55  OUTSIDE,
56  INLINE,
57  MANUAL
58 };
59 
63 enum class DIM_UNITS_MODE
64 {
65  INCHES,
66  MILS,
68  AUTOMATIC
69 };
70 
74 enum class DIM_TEXT_FRAME
75 {
76  NONE,
77  RECTANGLE,
78  CIRCLE,
79  ROUNDRECT
80 };
81 
101 class DIMENSION : public BOARD_ITEM
102 {
103 public:
104  DIMENSION( BOARD_ITEM* aParent, KICAD_T aType = PCB_DIMENSION_T );
105 
106  bool IsType( const KICAD_T aScanTypes[] ) const override
107  {
108  if( BOARD_ITEM::IsType( aScanTypes ) )
109  return true;
110 
111  for( const KICAD_T* p = aScanTypes; *p != EOT; ++p )
112  {
113  if( *p == PCB_LOCATE_GRAPHIC_T )
114  return true;
115  }
116 
117  return false;
118  }
119 
120  void SetParent( EDA_ITEM* aParent ) override;
121 
127  virtual const wxPoint& GetStart() const { return m_start; }
128  virtual void SetStart( const wxPoint& aPoint );
129 
130  virtual const wxPoint& GetEnd() const { return m_end; }
131  virtual void SetEnd( const wxPoint& aPoint );
132 
133  // These deal with the text position
134  wxPoint GetPosition() const override;
135  void SetPosition( const wxPoint& aPos ) override;
136 
138  void SetOverrideTextEnabled( bool aOverride ) { m_overrideTextEnabled = aOverride; }
139 
140  wxString GetOverrideText() const { return m_valueString; }
141  void SetOverrideText( const wxString& aValue ) { m_valueString = aValue; }
142 
143  int GetMeasuredValue() const { return m_measuredValue; }
144 
148  wxString GetValueText() const;
149 
153  void Update()
154  {
155  updateGeometry();
156  updateText();
157  }
158 
159  wxString GetPrefix() const { return m_prefix; }
160  void SetPrefix( const wxString& aPrefix );
161 
162  wxString GetSuffix() const { return m_suffix; }
163  void SetSuffix( const wxString& aSuffix );
164 
165  void GetUnits( EDA_UNITS& aUnits, bool& aUseMils ) const
166  {
167  aUnits = m_units;
168  aUseMils = m_useMils;
169  }
170 
171  void SetUnits( EDA_UNITS aUnits, bool aUseMils );
172 
174  void SetUnitsMode( DIM_UNITS_MODE aMode );
175 
176  void SetAutoUnits( bool aAuto = true ) { m_autoUnits = aAuto; }
177 
179  void SetUnitsFormat( const DIM_UNITS_FORMAT aFormat ) { m_unitsFormat = aFormat; }
180 
181  int GetPrecision() const { return m_precision; }
182  void SetPrecision( int aPrecision ) { m_precision = aPrecision; }
183 
184  bool GetSuppressZeroes() const { return m_suppressZeroes; }
185  void SetSuppressZeroes( bool aSuppress ) { m_suppressZeroes = aSuppress; }
186 
187  bool GetKeepTextAligned() const { return m_keepTextAligned; }
188  void SetKeepTextAligned( bool aKeepAligned ) { m_keepTextAligned = aKeepAligned; }
189 
192 
193  int GetArrowLength() const { return m_arrowLength; }
194  void SetArrowLength( int aLength ) { m_arrowLength = aLength; }
195 
196  void SetExtensionOffset( int aOffset ) { m_extensionOffset = aOffset; }
197  int GetExtensionOffset() const { return m_extensionOffset; }
198 
199  int GetLineThickness() const { return m_lineThickness; }
200  void SetLineThickness( int aWidth ) { m_lineThickness = aWidth; }
201 
202  void SetLayer( PCB_LAYER_ID aLayer ) override;
203 
204  void SetTextSize( const wxSize& aTextSize )
205  {
206  m_text.SetTextSize( aTextSize );
207  }
208 
213  void SetText( const wxString& aNewText );
214 
219  const wxString GetText() const;
220 
221  TEXTE_PCB& Text() { return m_text; }
222  TEXTE_PCB& Text() const { return *( const_cast<TEXTE_PCB*> ( &m_text ) ); }
223 
227  const std::vector<std::shared_ptr<SHAPE>>& GetShapes() const { return m_shapes; }
228 
233  std::vector<SHAPE*> MakeEffectiveShapes() const;
234 
235  // BOARD_ITEM overrides
236 
237  void Move( const wxPoint& offset ) override;
238  void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
239  void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
240 
247  void Mirror( const wxPoint& axis_pos, bool aMirrorLeftRight = false );
248 
249  void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
250 
251  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
252  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
253 
254  const EDA_RECT GetBoundingBox() const override;
255 
256  std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer ) const override;
257 
258  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
259 
260  const BOX2I ViewBBox() const override;
261 
262 #if defined(DEBUG)
263  virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
264 #endif
265 
266 protected:
267 
271  virtual void updateGeometry() = 0;
272 
276  virtual void updateText();
277 
278  template<typename ShapeType>
279  void addShape( ShapeType* aShape );
280 
288  static OPT_VECTOR2I segPolyIntersection( SHAPE_POLY_SET& aPoly, SEG& aSeg, bool aStart = true );
289 
290  // Value format
292  wxString m_valueString;
293  wxString m_prefix;
294  wxString m_suffix;
296  bool m_useMils;
297  bool m_autoUnits;
301 
302  // Geometry
308 
309  // Internal
314 
316  std::vector<std::shared_ptr<SHAPE>> m_shapes;
317 
318  static constexpr float s_arrowAngle = 27.5;
319 };
320 
349 {
350 protected:
351  // Geometry
352  int m_height;
354 
357 
358 public:
360 
361  // Do not create a copy constructor & operator=.
362  // The ones generated by the compiler are adequate.
363 
364  ~ALIGNED_DIMENSION() = default;
365 
366  static inline bool ClassOf( const EDA_ITEM* aItem )
367  {
368  return aItem && PCB_DIM_ALIGNED_T == aItem->Type();
369  }
370 
371  EDA_ITEM* Clone() const override;
372 
373  virtual void SwapData( BOARD_ITEM* aImage ) override;
374 
375  BITMAP_DEF GetMenuImage() const override;
376 
377  const wxPoint& GetCrossbarStart() const { return m_crossBarStart; }
378 
379  const wxPoint& GetCrossbarEnd() const { return m_crossBarEnd; }
380 
385  void SetHeight( int aHeight );
386  int GetHeight() const { return m_height; }
387 
392  void UpdateHeight( const wxPoint& aCrossbarStart, const wxPoint& aCrossbarEnd );
393 
394  void SetExtensionHeight( int aHeight ) { m_extensionHeight = aHeight; }
395  int GetExtensionHeight() const { return m_extensionHeight; }
396 
402  double GetAngle() const
403  {
404  wxPoint delta( m_end - m_start );
405 
406  return atan2( (double)delta.y, (double)delta.x );
407  }
408 
409  wxString GetClass() const override
410  {
411  return wxT( "ALIGNED_DIMENSION" );
412  }
413 
414 protected:
415 
416  void updateGeometry() override;
417 
418  void updateText() override;
419 };
420 
421 
427 {
428 public:
429  enum class DIR
430  {
431  HORIZONTAL, // Aligned with x-axis
432  VERTICAL // Aligned with y-axis
433  };
434 
435 private:
436  // Geometry
438 
439 public:
440  ORTHOGONAL_DIMENSION( BOARD_ITEM* aParent );
441 
442  ~ORTHOGONAL_DIMENSION() = default;
443 
444  static inline bool ClassOf( const EDA_ITEM* aItem )
445  {
446  return aItem && PCB_DIM_ORTHOGONAL_T == aItem->Type();
447  }
448 
449  EDA_ITEM* Clone() const override;
450 
451  void SwapData( BOARD_ITEM* aImage ) override;
452 
453  BITMAP_DEF GetMenuImage() const override;
454 
459  void SetOrientation( DIR aOrientation ) { m_orientation = aOrientation; }
460  DIR GetOrientation() const { return m_orientation; }
461 
462  wxString GetClass() const override
463  {
464  return wxT( "ORTHOGONAL_DIMENSION" );
465  }
466 
467 protected:
468 
469  void updateGeometry() override;
470 
471  void updateText() override;
472 };
473 
474 
489 class LEADER : public DIMENSION
490 {
492 
493 public:
494  LEADER( BOARD_ITEM* aParent );
495 
496  static inline bool ClassOf( const EDA_ITEM* aItem )
497  {
498  return aItem && PCB_DIM_LEADER_T == aItem->Type();
499  }
500 
501  EDA_ITEM* Clone() const override;
502 
503  virtual void SwapData( BOARD_ITEM* aImage ) override;
504 
505  BITMAP_DEF GetMenuImage() const override;
506 
507  wxString GetClass() const override
508  {
509  return wxT( "LEADER" );
510  }
511 
512  void SetTextFrame( DIM_TEXT_FRAME aFrame ) { m_textFrame = aFrame; }
514 
515  void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
516 
517 protected:
518 
519  void updateGeometry() override;
520 };
521 
522 
529 {
530 
531 public:
532  CENTER_DIMENSION( BOARD_ITEM* aParent );
533 
534  static inline bool ClassOf( const EDA_ITEM* aItem )
535  {
536  return aItem && PCB_DIM_CENTER_T == aItem->Type();
537  }
538 
539  EDA_ITEM* Clone() const override;
540 
541  virtual void SwapData( BOARD_ITEM* aImage ) override;
542 
543  BITMAP_DEF GetMenuImage() const override;
544 
545  wxString GetClass() const override
546  {
547  return wxT( "CENTER_DIMENSION" );
548  }
549 
550  const EDA_RECT GetBoundingBox() const override;
551 
552  const BOX2I ViewBBox() const override;
553 
554 protected:
555 
556  void updateGeometry() override;
557 };
558 
559 #endif // DIMENSION_H_
Text placement is manually set by the user.
CENTER_DIMENSION(BOARD_ITEM *aParent)
EDA_UNITS
Definition: common.h:198
int m_extensionHeight
Length of extension lines past the crossbar.
void SetKeepTextAligned(bool aKeepAligned)
~ALIGNED_DIMENSION()=default
LINE_READER is an abstract class from which implementation specific LINE_READERs may be derived to re...
Definition: richio.h:81
DIM_UNITS_MODE
Used for storing the units selection in the file because EDA_UNITS alone doesn't cut it.
Text appears outside the dimension line (default)
class ALIGNED_DIMENSION, a linear dimension (graphic item)
Definition: typeinfo.h:101
class LEADER, a leader dimension (graphic item)
Definition: typeinfo.h:102
void SetPosition(const wxPoint &aPos) override
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
void SetOverrideText(const wxString &aValue)
PNG memory record (file in memory).
Definition: bitmap_def.h:29
TEXTE_PCB class definition.
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
static bool ClassOf(const EDA_ITEM *aItem)
EDA_UNITS m_units
0 = inches, 1 = mm
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer) const override
Function GetEffectiveShape Some pad shapes can be complex (rounded/chamfered rectangle),...
void SetTextFrame(DIM_TEXT_FRAME aFrame)
void SetSuffix(const wxString &aSuffix)
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
DIM_TEXT_FRAME GetTextFrame() const
void SetPrefix(const wxString &aPrefix)
DIM_TEXT_POSITION GetTextPositionMode() const
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
virtual void SetStart(const wxPoint &aPoint)
int GetPrecision() const
class CENTER_DIMENSION, a center point marking (graphic item)
Definition: typeinfo.h:103
void updateGeometry() override
Updates the cached geometry of the dimension after changing any of its properties.
static constexpr float s_arrowAngle
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
void updateText() override
Updates the text field value from the current geometry (called by updateGeometry normally)
void Update()
Updates the dimension's cached text and geometry.
const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers.
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
wxString m_prefix
String prepended to the value.
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
virtual const wxPoint & GetEnd() const
int m_measuredValue
value of PCB dimensions
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:238
bool m_suppressZeroes
Suppress trailing zeroes.
wxString GetClass() const override
Function GetClass returns the class name.
DIM_UNITS_MODE GetUnitsMode() const
void Mirror(const wxPoint &axis_pos, bool aMirrorLeftRight=false)
Mirror the Dimension , relative to a given horizontal axis the text is not mirrored.
void SetUnits(EDA_UNITS aUnits, bool aUseMils)
The base class for create windows for drawing purpose.
LEADER(BOARD_ITEM *aParent)
const wxPoint & GetCrossbarStart() const
const std::vector< std::shared_ptr< SHAPE > > & GetShapes() const
bool m_autoUnits
If true, follow the currently selected UI units.
std::vector< SHAPE * > MakeEffectiveShapes() const
search types array terminator (End Of Types)
Definition: typeinfo.h:82
void SetLayer(PCB_LAYER_ID aLayer) override
Function SetLayer sets the layer this item is on.
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
static bool ClassOf(const EDA_ITEM *aItem)
int m_height
Perpendicular distance from features to crossbar.
const wxPoint & GetCrossbarEnd() const
double GetAngle() const
Function GetAngle Returns angle of the crossbar.
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
void SetExtensionHeight(int aHeight)
static bool ClassOf(const EDA_ITEM *aItem)
void SetUnitsMode(DIM_UNITS_MODE aMode)
void updateText() override
Updates the text field value from the current geometry (called by updateGeometry normally)
wxString GetClass() const override
Function GetClass returns the class name.
void SetText(const wxString &aNewText)
Sets the override text - has no effect if m_overrideValue == false.
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
void SetArrowLength(int aLength)
PCB_LAYER_ID
A quick note on layer IDs:
int GetExtensionOffset() const
bool m_keepTextAligned
Calculate text orientation to match dimension.
void SetHeight(int aHeight)
Sets the distance from the feature points to the crossbar line.
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
void SetOverrideTextEnabled(bool aOverride)
virtual void updateText()
Updates the text field value from the current geometry (called by updateGeometry normally)
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
int m_extensionOffset
Distance from feature points to extension line start.
OPT< VECTOR2I > OPT_VECTOR2I
Definition: seg.h:37
A leader is a dimension-like object pointing to a specific point.
void SetTextSize(const wxSize &aTextSize)
int GetExtensionHeight() const
SHAPE_POLY_SET.
void updateGeometry() override
Updates the cached geometry of the dimension after changing any of its properties.
bool GetKeepTextAligned() const
int GetArrowLength() const
DIR GetOrientation() const
void SetParent(EDA_ITEM *aParent) override
An orthogonal dimension is like an aligned dimension, but the extension lines are locked to the X or ...
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
Text appears in line with the dimension line.
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
wxPoint GetPosition() const override
void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
virtual bool IsType(const KICAD_T aScanTypes[]) const
Function IsType Checks whether the item is one of the listed types.
Definition: base_struct.h:262
int m_precision
Number of digits to display after decimal.
std::vector< std::shared_ptr< SHAPE > > m_shapes
DIM_UNITS_FORMAT GetUnitsFormat() const
bool GetSuppressZeroes() const
wxString GetOverrideText() const
wxString GetPrefix() const
TEXTE_PCB m_text
The actual text object.
class DIMENSION: abstract dimension meta-type
Definition: typeinfo.h:100
int m_lineThickness
Thickness used for all graphics in the dimension.
~ORTHOGONAL_DIMENSION()=default
void SetOrientation(DIR aOrientation)
Sets the orientation of the dimension line (so, perpendicular to the feature lines)
void SetPrecision(int aPrecision)
void UpdateHeight(const wxPoint &aCrossbarStart, const wxPoint &aCrossbarEnd)
Updates stored height basing on points coordinates.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
DIM_TEXT_POSITION m_textPosition
How to position the text.
int GetHeight() const
Definition: seg.h:39
wxString GetClass() const override
Function GetClass returns the class name.
TEXTE_PCB & Text() const
DIM_TEXT_POSITION
Where to place the text on a dimension.
bool m_useMils
If inches, use mils.
virtual const wxPoint & GetStart() const
The dimension's origin is the first feature point for the dimension.
void updateGeometry() override
Updates the cached geometry of the dimension after changing any of its properties.
wxString GetSuffix() const
DIM_TEXT_FRAME m_textFrame
static bool ClassOf(const EDA_ITEM *aItem)
wxString GetClass() const override
Function GetClass returns the class name.
ALIGNED_DIMENSION(BOARD_ITEM *aParent, KICAD_T aType=PCB_DIM_ALIGNED_T)
void Move(const wxPoint &offset) override
Function Move move this object.
wxPoint m_end
Internal cache of drawn shapes.
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
TEXTE_PCB & Text()
void SetUnitsFormat(const DIM_UNITS_FORMAT aFormat)
void SetExtensionOffset(int aOffset)
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
int GetLineThickness() const
bool IsType(const KICAD_T aScanTypes[]) const override
Function IsType Checks whether the item is one of the listed types.
void SetAutoUnits(bool aAuto=true)
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
DIM_UNITS_FORMAT m_unitsFormat
How to render the units suffix.
void SetTextPositionMode(DIM_TEXT_POSITION aMode)
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159
bool GetOverrideTextEnabled() const
const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers.
void addShape(ShapeType *aShape)
void GetUnits(EDA_UNITS &aUnits, bool &aUseMils) const
ORTHOGONAL_DIMENSION(BOARD_ITEM *aParent)
DIM_TEXT_FRAME
Frame to show around dimension text.
class ORTHOGONAL_DIMENSION, a linear dimension constrained to x/y
Definition: typeinfo.h:104
wxString GetValueText() const
bool m_overrideTextEnabled
Manually specify the displayed measurement value.
wxString m_valueString
Displayed value when m_overrideValue = true.
const wxString GetText() const
Retrieves the value text or override text, not including prefix or suffix.
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
wxPoint m_start
static OPT_VECTOR2I segPolyIntersection(SHAPE_POLY_SET &aPoly, SEG &aSeg, bool aStart=true)
Finds the intersection between a given segment and polygon outline.
wxString m_suffix
String appended to the value.
void updateGeometry() override
Updates the cached geometry of the dimension after changing any of its properties.
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
For better understanding of the points that make a dimension:
DIMENSION(BOARD_ITEM *aParent, KICAD_T aType=PCB_DIMENSION_T)
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
wxPoint m_crossBarEnd
Crossbar end control point.
wxPoint m_crossBarStart
Crossbar start control point.
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
Abstract dimension API.
void SetLineThickness(int aWidth)
virtual void SetEnd(const wxPoint &aPoint)
int m_arrowLength
Length of arrow shapes.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:193
int GetMeasuredValue() const
DIR m_orientation
What axis to lock the dimension line to.
void SetSuppressZeroes(bool aSuppress)
virtual void updateGeometry()=0
Updates the cached geometry of the dimension after changing any of its properties.
Marks the center of a circle or arc with a cross shape The size and orientation of the cross is adjus...