KiCad PCB EDA Suite
lib_polyline.cpp
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) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2004-2017 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 
29 #include <fctsys.h>
30 #include <gr_basic.h>
31 #include <macros.h>
32 #include <class_drawpanel.h>
33 #include <plotter.h>
34 #include <trigo.h>
35 #include <base_units.h>
36 #include <msgpanel.h>
37 #include <bitmaps.h>
38 
39 #include <general.h>
40 #include <lib_polyline.h>
41 #include <transform.h>
42 
43 
45  LIB_ITEM( LIB_POLYLINE_T, aParent )
46 {
47  m_Fill = NO_FILL;
48  m_Width = 0;
49  m_isFillable = true;
50  m_ModifyIndex = 0;
51 }
52 
53 
55 {
56  return new LIB_POLYLINE( *this );
57 }
58 
59 
60 int LIB_POLYLINE::compare( const LIB_ITEM& aOther ) const
61 {
62  wxASSERT( aOther.Type() == LIB_POLYLINE_T );
63 
64  const LIB_POLYLINE* tmp = (LIB_POLYLINE*) &aOther;
65 
66  if( m_PolyPoints.size() != tmp->m_PolyPoints.size() )
67  return m_PolyPoints.size() - tmp->m_PolyPoints.size();
68 
69  for( size_t i = 0; i < m_PolyPoints.size(); i++ )
70  {
71  if( m_PolyPoints[i].x != tmp->m_PolyPoints[i].x )
72  return m_PolyPoints[i].x - tmp->m_PolyPoints[i].x;
73 
74  if( m_PolyPoints[i].y != tmp->m_PolyPoints[i].y )
75  return m_PolyPoints[i].y - tmp->m_PolyPoints[i].y;
76  }
77 
78  return 0;
79 }
80 
81 
82 void LIB_POLYLINE::SetOffset( const wxPoint& aOffset )
83 {
84  for( size_t i = 0; i < m_PolyPoints.size(); i++ )
85  m_PolyPoints[i] += aOffset;
86 }
87 
88 
89 bool LIB_POLYLINE::Inside( EDA_RECT& aRect ) const
90 {
91  for( size_t i = 0; i < m_PolyPoints.size(); i++ )
92  {
93  if( aRect.Contains( m_PolyPoints[i].x, -m_PolyPoints[i].y ) )
94  return true;
95  }
96 
97  return false;
98 }
99 
100 
101 void LIB_POLYLINE::Move( const wxPoint& aPosition )
102 {
103  SetOffset( aPosition - m_PolyPoints[0] );
104 }
105 
106 
108 {
109  size_t i, imax = m_PolyPoints.size();
110 
111  for( i = 0; i < imax; i++ )
112  {
113  m_PolyPoints[i].x -= aCenter.x;
114  m_PolyPoints[i].x *= -1;
115  m_PolyPoints[i].x += aCenter.x;
116  }
117 }
118 
119 void LIB_POLYLINE::MirrorVertical( const wxPoint& aCenter )
120 {
121  size_t i, imax = m_PolyPoints.size();
122 
123  for( i = 0; i < imax; i++ )
124  {
125  m_PolyPoints[i].y -= aCenter.y;
126  m_PolyPoints[i].y *= -1;
127  m_PolyPoints[i].y += aCenter.y;
128  }
129 }
130 
131 void LIB_POLYLINE::Rotate( const wxPoint& aCenter, bool aRotateCCW )
132 {
133  int rot_angle = aRotateCCW ? -900 : 900;
134 
135  size_t i, imax = m_PolyPoints.size();
136 
137  for( i = 0; i < imax; i++ )
138  {
139  RotatePoint( &m_PolyPoints[i], aCenter, rot_angle );
140  }
141 }
142 
143 
144 void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
145  const TRANSFORM& aTransform )
146 {
147  wxASSERT( aPlotter != NULL );
148 
149  static std::vector< wxPoint > cornerList;
150  cornerList.clear();
151 
152  for( unsigned ii = 0; ii < m_PolyPoints.size(); ii++ )
153  {
154  wxPoint pos = m_PolyPoints[ii];
155  pos = aTransform.TransformCoordinate( pos ) + aOffset;
156  cornerList.push_back( pos );
157  }
158 
159  if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
160  {
162  aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 );
163  }
164 
165  bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
166  aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
167  aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
168 }
169 
170 
171 void LIB_POLYLINE::AddPoint( const wxPoint& point )
172 {
173  m_PolyPoints.push_back( point );
174 }
175 
176 
178 {
179  return ( m_Width == 0 ) ? GetDefaultLineThickness() : m_Width;
180 }
181 
182 
183 void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
184  COLOR4D aColor, GR_DRAWMODE aDrawMode, void* aData,
185  const TRANSFORM& aTransform )
186 {
187  wxPoint pos1;
189  wxPoint* buffer = NULL;
190 
191  if( aColor == COLOR4D::UNSPECIFIED ) // Used normal color or selected color
192  {
193  if( IsSelected() )
194  color = GetItemSelectedColor();
195  }
196  else
197  {
198  color = aColor;
199  }
200 
201  buffer = new wxPoint[ m_PolyPoints.size() ];
202 
203  for( unsigned ii = 0; ii < m_PolyPoints.size(); ii++ )
204  {
205  buffer[ii] = aTransform.TransformCoordinate( m_PolyPoints[ii] ) + aOffset;
206  }
207 
208  FILL_T fill = aData ? NO_FILL : m_Fill;
209 
210  if( aColor != COLOR4D::UNSPECIFIED )
211  fill = NO_FILL;
212 
213  GRSetDrawMode( aDC, aDrawMode );
214 
215  EDA_RECT* const clipbox = aPanel? aPanel->GetClipBox() : NULL;
216  if( fill == FILLED_WITH_BG_BODYCOLOR )
217  GRPoly( clipbox, aDC, m_PolyPoints.size(), buffer, 1, GetPenSize(),
220  else if( fill == FILLED_SHAPE )
221  GRPoly( clipbox, aDC, m_PolyPoints.size(), buffer, 1, GetPenSize(),
222  color, color );
223  else
224  GRPoly( clipbox, aDC, m_PolyPoints.size(), buffer, 0, GetPenSize(),
225  color, color );
226 
227  delete[] buffer;
228 
229  /* Set to one (1) to draw bounding box around polyline to validate
230  * bounding box calculation. */
231 #if 0
232  EDA_RECT bBox = GetBoundingBox();
233  bBox.RevertYAxis();
234  bBox = aTransform.TransformCoordinate( bBox );
235  bBox.Move( aOffset );
236  GRRect( clipbox, aDC, bBox, 0, LIGHTMAGENTA );
237 #endif
238 }
239 
240 
241 bool LIB_POLYLINE::HitTest( const wxPoint& aPosition ) const
242 {
243  int mindist = GetPenSize() / 2;
244 
245  // Have a minimal tolerance for hit test
246  if( mindist < MINIMUM_SELECTION_DISTANCE )
247  mindist = MINIMUM_SELECTION_DISTANCE;
248 
249  return HitTest( aPosition, mindist, DefaultTransform );
250 }
251 
252 
253 bool LIB_POLYLINE::HitTest( const wxPoint &aPosition, int aThreshold, const TRANSFORM& aTransform ) const
254 {
255  wxPoint start, end;
256 
257  if( aThreshold < 0 )
258  aThreshold = GetPenSize() / 2;
259 
260  for( unsigned ii = 1; ii < GetCornerCount(); ii++ )
261  {
262  start = aTransform.TransformCoordinate( m_PolyPoints[ii - 1] );
263  end = aTransform.TransformCoordinate( m_PolyPoints[ii] );
264 
265  if( TestSegmentHit( aPosition, start, end, aThreshold ) )
266  return true;
267  }
268 
269  return false;
270 }
271 
272 
274 {
275  EDA_RECT rect;
276  int xmin, xmax, ymin, ymax;
277 
278  xmin = xmax = m_PolyPoints[0].x;
279  ymin = ymax = m_PolyPoints[0].y;
280 
281  for( unsigned ii = 1; ii < GetCornerCount(); ii++ )
282  {
283  xmin = std::min( xmin, m_PolyPoints[ii].x );
284  xmax = std::max( xmax, m_PolyPoints[ii].x );
285  ymin = std::min( ymin, m_PolyPoints[ii].y );
286  ymax = std::max( ymax, m_PolyPoints[ii].y );
287  }
288 
289  rect.SetOrigin( xmin, ymin );
290  rect.SetEnd( xmax, ymax );
291  rect.Inflate( ( GetPenSize()+1 ) / 2 );
292 
293  rect.RevertYAxis();
294 
295  return rect;
296 }
297 
298 
299 void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition )
300 {
301  // First segment is kept, only its end point is changed
302  while( GetCornerCount() > 2 )
303  {
304  m_PolyPoints.pop_back();
305 
306  if( m_PolyPoints[ GetCornerCount() - 1 ] != aPosition )
307  {
308  m_PolyPoints[ GetCornerCount() - 1 ] = aPosition;
309  break;
310  }
311  }
312 }
313 
314 
316 {
317  wxString msg;
318  EDA_RECT bBox = GetBoundingBox();
319 
320  LIB_ITEM::GetMsgPanelInfo( aList );
321 
322  msg = StringFromValue( g_UserUnit, m_Width, true );
323 
324  aList.push_back( MSG_PANEL_ITEM( _( "Line Width" ), msg, BLUE ) );
325 
326  msg.Printf( wxT( "(%d, %d, %d, %d)" ), bBox.GetOrigin().x,
327  bBox.GetOrigin().y, bBox.GetEnd().x, bBox.GetEnd().y );
328 
329  aList.push_back( MSG_PANEL_ITEM( _( "Bounding Box" ), msg, BROWN ) );
330 }
331 
332 
334 {
335  return wxString::Format( _( "Polyline at (%s, %s) with %d points" ),
338  int( m_PolyPoints.size() ) );
339 }
340 
341 
343 {
344  return add_polygon_xpm;
345 }
346 
347 
348 void LIB_POLYLINE::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
349 {
350  wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
351  wxT( "Invalid edit mode for LIB_POLYLINE object." ) );
352 
353  if( aEditMode == IS_NEW )
354  {
355  m_PolyPoints.push_back( aPosition ); // Start point of first segment.
356  m_PolyPoints.push_back( aPosition ); // End point of first segment.
357  }
358  else if( aEditMode == IS_RESIZED )
359  {
360  // Drag one edge point of the polyline
361  // Find the nearest edge point to be dragged
362  wxPoint startPoint = m_PolyPoints[0];
363 
364  // Begin with the first list point as nearest point
365  int index = 0;
366  m_ModifyIndex = 0;
367  m_initialPos = startPoint;
368 
369  // First distance is the current minimum distance
370  int distanceMin = (aPosition - startPoint).x * (aPosition - startPoint).x
371  + (aPosition - startPoint).y * (aPosition - startPoint).y;
372 
373  wxPoint prevPoint = startPoint;
374 
375  // Find the right index of the point to be dragged
376  for( wxPoint point : m_PolyPoints )
377  {
378  int distancePoint = (aPosition - point).x * (aPosition - point).x +
379  (aPosition - point).y * (aPosition - point).y;
380 
381  if( distancePoint < distanceMin )
382  {
383  // Save point.
384  m_initialPos = point;
385  m_ModifyIndex = index;
386  distanceMin = distancePoint;
387  }
388 
389  // check middle of an edge
390  wxPoint offset = ( aPosition + aPosition - point - prevPoint );
391  distancePoint = ( offset.x * offset.x + offset.y * offset.y ) / 4 + 1;
392 
393  if( distancePoint < distanceMin )
394  {
395  // Save point.
396  m_initialPos = point;
397  m_ModifyIndex = -index; // negative indicates new vertex is to be inserted
398  distanceMin = distancePoint;
399  }
400 
401  prevPoint = point;
402  index++;
403  }
404 
406  }
407  else if( aEditMode == IS_MOVED )
408  {
409  m_initialCursorPos = aPosition;
412  }
413 
414  m_Flags = aEditMode;
415 }
416 
417 
418 bool LIB_POLYLINE::ContinueEdit( const wxPoint aPosition )
419 {
420  wxCHECK_MSG( ( m_Flags & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0, false,
421  wxT( "Bad call to ContinueEdit(). LIB_POLYLINE is not being edited." ) );
422 
423  if( m_Flags == IS_NEW )
424  {
425  // do not add zero length segments
426  if( m_PolyPoints[m_PolyPoints.size() - 2] != m_PolyPoints.back() )
427  m_PolyPoints.push_back( aPosition );
428 
429  return true;
430  }
431 
432  return false;
433 }
434 
435 
436 void LIB_POLYLINE::EndEdit( const wxPoint& aPosition, bool aAbort )
437 {
438  wxCHECK_RET( ( m_Flags & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
439  wxT( "Bad call to EndEdit(). LIB_POLYLINE is not being edited." ) );
440 
441  // do not include last point twice
442  if( m_Flags == IS_NEW && 2 < m_PolyPoints.size() )
443  {
444  if( m_PolyPoints[ m_PolyPoints.size() - 2 ] == m_PolyPoints.back() )
445  m_PolyPoints.pop_back();
446  }
447 
448  if( (m_Flags == IS_RESIZED) && (m_PolyPoints.size() > 2) ) // do not delete last two points... keep it alive
449  {
450  if( ( m_ModifyIndex > 0 && m_PolyPoints[ m_ModifyIndex ] ==
451  m_PolyPoints[ m_ModifyIndex - 1 ] )
452  || ( m_ModifyIndex < (int) m_PolyPoints.size() - 1
454  {
455  m_PolyPoints.erase( m_PolyPoints.begin() + m_ModifyIndex ); // delete a point on this
456  }
457  }
458 
459  m_Flags = 0;
460  SetEraseLastDrawItem( false );
461 }
462 
463 
464 void LIB_POLYLINE::calcEdit( const wxPoint& aPosition )
465 {
466  if( m_Flags == IS_NEW )
467  {
468  m_PolyPoints[ GetCornerCount() - 1 ] = aPosition;
470  }
471  else if( m_Flags == IS_RESIZED )
472  {
473  if( m_ModifyIndex < 0 ) // negative indicates new vertex is to be inserted
474  {
476  m_PolyPoints.insert( m_PolyPoints.begin() + m_ModifyIndex, aPosition );
477  }
478 
479  m_PolyPoints[ m_ModifyIndex ] = aPosition;
480  }
481  else if( m_Flags == IS_MOVED )
482  {
483  Move( m_initialPos + aPosition - m_initialCursorPos );
484  }
485 }
Definition: colors.h:57
wxString CoordinateToString(int aValue, bool aConvertToMils)
Function CoordinateToString is a helper to convert the integer coordinate aValue to a string in inche...
Definition: base_units.cpp:118
KICAD_T Type() const
Function Type()
Definition: base_struct.h:209
bool Inside(EDA_RECT &aRect) const override
Test if any part of the draw object is inside rectangle bounds of aRect.
void GRPoly(EDA_RECT *ClipBox, wxDC *DC, int n, wxPoint Points[], bool Fill, int width, COLOR4D Color, COLOR4D BgColor)
Definition: gr_basic.cpp:796
void Move(const wxPoint &aMoveVector)
Function Move moves the rectangle by the aMoveVector.
const wxPoint GetOrigin() const
Definition: eda_rect.h:112
void calcEdit(const wxPoint &aPosition) override
Calculates the attributes of an item at aPosition when it is being edited.
PNG memory record (file in memory).
Definition: bitmap_types.h:41
void GRSetDrawMode(wxDC *DC, GR_DRAWMODE draw_mode)
Definition: gr_basic.cpp:318
void SetEraseLastDrawItem(bool aErase=true)
Implementation of conversion functions that require both schematic and board internal units...
virtual void SetColor(COLOR4D color)=0
#define MINIMUM_SELECTION_DISTANCE
Definition: lib_draw_item.h:52
bool Contains(const wxPoint &aPoint) const
Function Contains.
wxString StringFromValue(EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol)
Function StringFromValue returns the string from aValue according to units (inch, mm ...
Definition: base_units.cpp:205
int compare(const LIB_ITEM &aOther) const override
Provide the draw object specific comparison called by the == and < operators.
int color
Definition: DXF_plotter.cpp:62
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
bool IsSelected() const
Definition: base_struct.h:232
void GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
void SetOrigin(const wxPoint &pos)
Definition: eda_rect.h:124
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Function PlotPoly.
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Definition: eeschema.cpp:167
void RevertYAxis()
Function RevertYAxis Mirror the rectangle from the X axis (negate Y pos and size) ...
Definition: eda_rect.h:144
void BeginEdit(STATUS_FLAGS aEditMode, const wxPoint aStartPoint=wxPoint(0, 0)) override
Begin an editing a component library draw item in aEditMode at aPosition.
unsigned GetCornerCount() const
Definition: lib_polyline.h:77
The base class for drawable items used by schematic library components.
Definition: lib_draw_item.h:66
This file contains miscellaneous commonly used macros and functions.
#define IS_NEW
New item, just created.
Definition: base_struct.h:109
void SetOffset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
void GRRect(EDA_RECT *aClipBox, wxDC *aDC, int x1, int y1, int x2, int y2, COLOR4D aColor)
Definition: gr_basic.cpp:1098
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
int GetPenSize() const override
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
void SetEnd(int x, int y)
Definition: eda_rect.h:134
void Move(const wxPoint &aPosition) override
Move a draw object to aPosition.
bool ContinueEdit(const wxPoint aNextPoint) override
Continue an edit in progress at aPosition.
bool m_isFillable
Flag to indicate if draw item is fillable.
Define a library symbol object.
unsigned STATUS_FLAGS
Definition: base_struct.h:142
EDA_RECT * GetClipBox()
std::vector< wxPoint > m_PolyPoints
Definition: lib_polyline.h:38
void AddPoint(const wxPoint &aPoint)
virtual void Rotate()
Rotate the draw item.
const wxPoint GetEnd() const
Definition: eda_rect.h:114
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:57
void DeleteSegment(const wxPoint aPosition)
Delete the segment at aPosition.
Base plotter engine class.
Definition: plotter.h:96
wxString GetSelectMenuText() const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
virtual void GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
TRANSFORM DefaultTransform
Definition: eeschema.cpp:58
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
#define max(a, b)
Definition: auxiliary.h:86
wxPoint m_initialPos
Temporary position when moving an existing item.
FILL_T m_Fill
The body fill type.
STATUS_FLAGS m_Flags
Flag bits for editing and other uses.
Definition: base_struct.h:186
size_t i
Definition: json11.cpp:597
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void drawGraphic(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, COLOR4D aColor, GR_DRAWMODE aDrawMode, void *aData, const TRANSFORM &aTransform) override
Draw the item on aPanel.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:162
#define IS_RESIZED
Item being resized.
Definition: base_struct.h:110
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:102
FILL_T
Enum FILL_T is the set of fill types used in plotting or drawing enclosed areas.
Definition: base_struct.h:52
const EDA_RECT GetBoundingBox() const override
COLOR4D GetItemSelectedColor()
Class EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Function TestSegmentHit test for hit on line segment i.e.
Definition: trigo.cpp:122
void EndEdit(const wxPoint &aPosition, bool aAbort=false) override
End an object editing action.
Message panel definition file.
LIB_POLYLINE(LIB_PART *aParent)
void Plot(PLOTTER *aPlotter, const wxPoint &aOffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
bool HitTest(const wxPoint &aPosition) const override
Function HitTest tests if aPosition is contained within or on the bounding area of an item...
wxPoint m_initialCursorPos
Initial cursor position at the beginning of a move.
#define min(a, b)
Definition: auxiliary.h:85
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
#define IS_MOVED
Item being moved.
Definition: base_struct.h:108
Definition: colors.h:62