35    const int size = aSize / 2;
 
 
   43    const std::array<double, 2> strokes = { aDashSize, aDashSize / 2 };
 
   44    const double                dashCycleLen = strokes[0] + strokes[1];
 
   51    const double theta = atan2( aSeg.
B.
y - aSeg.
A.
y, aSeg.
B.
x - aSeg.
A.
x );
 
   54        dashCycleLen * cos( theta ),
 
   55        dashCycleLen * sin( theta ),
 
   59        strokes[0] * cos( theta ),
 
   60        strokes[0] * sin( theta ),
 
   67        const VECTOR2D dashStart = aSeg.
A + cycleVec * cyclei;
 
   68        const VECTOR2D dashEnd = dashStart + dashVec;
 
   73        if( 
ClipLine( &clip, dashSeg.A.x, dashSeg.A.y, dashSeg.B.x, dashSeg.B.y ) )
 
   76        aGal.
DrawLine( dashSeg.A, dashSeg.B );
 
 
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
 
static constexpr BOX2< VECTOR2I > ByCorners(const VECTOR2I &aCorner1, const VECTOR2I &aCorner2)
 
Abstract interface for drawing on a 2D-surface.
 
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
 
double GetWorldScale() const
Get the world scale.
 
a few functions useful in geometry calculations.
 
bool ClipLine(const BOX2I *aClipBox, int &x1, int &y1, int &x2, int &y2)
Test if any part of a line falls within the bounds of a rectangle.
 
Utility functions for drawing compound items (i.e.
 
The Cairo implementation of the graphics abstraction layer.
 
void DrawCross(GAL &aGal, const VECTOR2I &aPosition, int aSize)
Draw a cross at a given position.
 
void DrawDashedLine(GAL &aGal, const SEG &aSeg, double aDashSize)
Draw a dashed line.
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D