DGtal  0.9.3beta
Public Member Functions | Static Private Attributes
LibBoard::Arrow Struct Reference

#include <Board/Shapes.h>

Inheritance diagram for LibBoard::Arrow:
[legend]
Collaboration diagram for LibBoard::Arrow:
[legend]

Public Member Functions

 Arrow (double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 
const std::string & name () const
 
Arrow rotated (double angle, const Point &center) const
 
Arrow rotated (double angle) const
 
Arrow translated (double dx, double dy) const
 
Arrow scaled (double sx, double sy) const
 
Arrow scaled (double s) const
 
void flushPostscript (std::ostream &stream, const TransformEPS &transform) const
 
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::Color, int > &colormap) const
 
void flushSVG (std::ostream &stream, const TransformSVG &transform) const
 
void flushCairo (cairo_t *cr, const TransformCairo &transform) const
 
void flushTikZ (std::ostream &stream, const TransformTikZ &transform) const
 
Arrowclone () const
 
- Public Member Functions inherited from LibBoard::Line
 Line (double x1, double y1, double x2, double y2, DGtal::Color color, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 
Point center () const
 
Linerotate (double angle, const Point &center)
 
Line rotated (double angle, const Point &center) const
 
Linerotate (double angle)
 
Line rotated (double angle) const
 
Linetranslate (double dx, double dy)
 
Line translated (double dx, double dy) const
 
Shapescale (double sx, double sy)
 
Shapescale (double s)
 
Line scaled (double sx, double sy) const
 
Line scaled (double s) const
 
void scaleAll (double s)
 
Rect boundingBox () const
 
- Public Member Functions inherited from LibBoard::Shape
 Shape (DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth)
 
virtual ~Shape ()
 
bool filled () const
 
ShaperotateDeg (double angle, const Point &center)
 
ShaperotateDeg (double angle)
 
Rect bbox ()
 
Shapeoperator-- ()
 
Shapeoperator++ ()
 
int depth () const
 
virtual void depth (int)
 
virtual void shiftDepth (int shift)
 
const DGtal::ColorpenColor () const
 
const DGtal::ColorfillColor () const
 

Static Private Attributes

static const std::string _name
 

Additional Inherited Members

- Public Types inherited from LibBoard::Shape
enum  LineCap { ButtCap = 0, RoundCap, SquareCap }
 
enum  LineJoin { MiterJoin = 0, RoundJoin, BevelJoin }
 
enum  LineStyle {
  SolidStyle = 0, DashStyle, DotStyle, DashDotStyle,
  DashDotDotStyle, DashDotDotDotStyle
}
 
- Protected Member Functions inherited from LibBoard::Shape
std::string svgProperties (const TransformSVG &transform) const
 
std::string postscriptProperties () const
 
void setCairoDashStyle (cairo_t *cr, LineStyle type) const
 
std::string tikzProperties (const TransformTikZ &transform) const
 
- Protected Attributes inherited from LibBoard::Line
double _x1
 
double _y1
 
double _x2
 
double _y2
 
- Protected Attributes inherited from LibBoard::Shape
int _depth
 
DGtal::Color _penColor
 
DGtal::Color _fillColor
 
double _lineWidth
 
LineStyle _lineStyle
 
LineCap _lineCap
 
LineJoin _lineJoin
 

Detailed Description

A line between two points with an arrow at one extremity.

The arrow structure.

Definition at line 665 of file Board/Shapes.h.

Constructor & Destructor Documentation

LibBoard::Arrow::Arrow ( double  x1,
double  y1,
double  x2,
double  y2,
DGtal::Color  penColor,
DGtal::Color  fillColor,
double  lineWidth,
const LineStyle  style = SolidStyle,
const LineCap  cap = ButtCap,
const LineJoin  join = MiterJoin,
int  depth = -1 
)
inline

Constructs an arrow.

Parameters
x1First coordinate of the start point.
y1Second coordinate of the start point.
x2First coordinate of the end point.
y2Second coordinate of the end point.
penColorThe color of the line.
fillColorThe fill color of the sharp end.
lineWidthThe line thickness.
styleLine style.
capLine cap.
joinLine join.
depthThe depth of the line.

Referenced by clone().

Member Function Documentation

Arrow * LibBoard::Arrow::clone ( ) const
virtual

Return a copy of the shape.

Returns
copye of the shape.

Reimplemented from LibBoard::Line.

Definition at line 789 of file Shapes.cpp.

References Arrow().

789  {
790  return new Arrow(*this);
791 }
Arrow(double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
void LibBoard::Arrow::flushCairo ( cairo_t *  cr,
const TransformCairo transform 
) const
virtual

Writes the cairo code of the shape in a cairo drawing context according to a transform.

Parameters
crThe cairo drawing context.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Line.

Definition at line 934 of file Shapes.cpp.

References LibBoard::Shape::_fillColor, LibBoard::Shape::_lineCap, LibBoard::Shape::_lineJoin, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, DGtal::Color::blue(), LibBoard::Shape::ButtCap, LibBoard::Shape::filled(), DGtal::Color::green(), LibBoard::Transform::mapX(), LibBoard::TransformCairo::mapY(), LibBoard::Shape::MiterJoin, DGtal::Color::None, DGtal::Color::red(), LibBoard::Transform::scale(), LibBoard::Shape::setCairoDashStyle(), and LibBoard::Shape::SolidStyle.

936 {
937  double dx = _x1 - _x2;
938  double dy = _y1 - _y2;
939  double norm = sqrt( dx*dx + dy*dy );
940  dx /= norm;
941  dy /= norm;
942  dx *= 10 * _lineWidth;
943  dy *= 10 * _lineWidth;
944 
945  // double back_x = 0.8 * dx + _x2;
946  // double back_y = 0.8 * dy + _y2;
947 
948  double ndx1 = dx*cos(0.3)-dy*sin(0.3);
949  double ndy1 = dx*sin(0.3)+dy*cos(0.3);
950  double ndx2 = dx*cos(-0.3)-dy*sin(-0.3);
951  double ndy2 = dx*sin(-0.3)+dy*cos(-0.3);
952 
953  cairo_save (cr);
954 
955  // The line
956  cairo_set_source_rgba (cr, _penColor.red()/255.0, _penColor.green()/255.0, _penColor.blue()/255.0, 1.);
957 
958  cairo_move_to (cr, transform.mapX( _x1 ), transform.mapY( _y1 ));
959  cairo_line_to (cr, transform.mapX( _x2 + ( dx * cos(0.3) ) ), transform.mapY( _y2 + ( dy * cos(0.3) ) ));
960 
961  cairo_set_line_width (cr, _lineWidth);
962  cairo_set_line_cap (cr, cairoLineCap[_lineCap]);
963  cairo_set_line_join (cr, cairoLineJoin[_lineJoin]);
965 
966  cairo_stroke (cr);
967 
968  // The arrow
969  cairo_set_source_rgba (cr, _fillColor.red()/255.0, _fillColor.green()/255.0, _fillColor.blue()/255.0, 1.);
970 
971  cairo_move_to (cr, transform.mapX( _x2 ) + transform.scale( ndx1 ), transform.mapY( _y2 ) - transform.scale( ndy1 ));
972  cairo_line_to (cr, transform.mapX( _x2 ), transform.mapY( _y2 ));
973  cairo_line_to (cr, transform.mapX( _x2 ) + transform.scale( ndx2 ), transform.mapY( _y2 ) - transform.scale( ndy2 ));
974  cairo_close_path (cr);
975 
976  if ( filled() )
977  {
978  if ( _penColor != DGtal::Color::None )
979  cairo_fill_preserve (cr);
980  else
981  cairo_fill (cr);
982  }
983 
984  //
985 
986  if ( _penColor != DGtal::Color::None )
987  {
988  cairo_set_source_rgba (cr, _penColor.red()/255.0, _penColor.green()/255.0, _penColor.blue()/255.0, 1.);
989 
990  cairo_set_line_width (cr, _lineWidth);
991  cairo_set_line_cap (cr, cairoLineCap[ButtCap]);
992  cairo_set_line_join (cr, cairoLineJoin[MiterJoin]);
994 
995  cairo_stroke (cr);
996  }
997 
998  cairo_restore (cr);
999 }
static const Color None
Definition: Color.h:387
LineJoin _lineJoin
Definition: Board/Shapes.h:301
bool filled() const
Definition: Board/Shapes.h:111
void green(const unsigned char aGreenValue)
DGtal::Color _penColor
Definition: Board/Shapes.h:296
void red(const unsigned char aRedValue)
void setCairoDashStyle(cairo_t *cr, LineStyle type) const
Definition: Shapes.cpp:154
LineStyle _lineStyle
Definition: Board/Shapes.h:299
DGtal::Color _fillColor
Definition: Board/Shapes.h:297
void blue(const unsigned char aBlueValue)
void LibBoard::Arrow::flushFIG ( std::ostream &  stream,
const TransformFIG transform,
std::map< DGtal::Color, int > &  colormap 
) const
virtual

Writes the FIG code of the shape in a stream according to a transform.

Parameters
streamThe output stream.
transformA 2D transform to be applied.
colormapA colormap.

Reimplemented from LibBoard::Line.

Definition at line 848 of file Shapes.cpp.

References LibBoard::Shape::_depth, LibBoard::Shape::_lineCap, LibBoard::Shape::_lineJoin, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Shape::filled(), LibBoard::TransformFIG::mapDepth(), LibBoard::TransformFIG::mapWidth(), LibBoard::Transform::mapX(), LibBoard::TransformFIG::mapY(), and DGtal::Color::valid().

851 {
852  stream << "2 1 ";
853  // Line style
854  stream << _lineStyle << " ";
855  // Thickness
856  stream << ( _penColor.valid()?transform.mapWidth( _lineWidth ):0 ) << " ";
857  // Pen color
858  stream << colormap[ _penColor ] << " ";
859  // Fill color
860  stream << colormap[ _penColor ] << " ";
861  // Depth
862  stream << transform.mapDepth( _depth ) << " ";
863  // Pen style
864  stream << "-1 ";
865  // Area fill, style val, join style, cap style, radius, f_arrow, b_arrow
866  stream << "-1 " << (_lineStyle?"4.000 ":"0.000 ") << _lineJoin << " " << _lineCap << " -1 1 0 ";
867  // Number of points
868  stream << "2\n";
869  if ( filled() )
870  stream << " 1 1 1.00 60.00 120.00\n";
871  else
872  stream << " 1 0 1.00 60.00 120.00\n";
873  stream << " ";
874  stream << static_cast<int>( transform.mapX( _x1 ) ) << " "
875  << static_cast<int>( transform.mapY( _y1 ) ) << " "
876  << static_cast<int>( transform.mapX( _x2 ) ) << " "
877  << static_cast<int>( transform.mapY( _y2 ) ) << std::endl;
878 }
bool valid() const
LineJoin _lineJoin
Definition: Board/Shapes.h:301
bool filled() const
Definition: Board/Shapes.h:111
DGtal::Color _penColor
Definition: Board/Shapes.h:296
LineStyle _lineStyle
Definition: Board/Shapes.h:299
void LibBoard::Arrow::flushPostscript ( std::ostream &  stream,
const TransformEPS transform 
) const
virtual

Writes the EPS code of the shape in a stream according to a transform.

Parameters
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Line.

Definition at line 794 of file Shapes.cpp.

References LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Shape::filled(), LibBoard::Transform::mapX(), LibBoard::TransformEPS::mapY(), DGtal::Color::postscript(), LibBoard::Shape::postscriptProperties(), and LibBoard::Transform::scale().

796 {
797  double dx = _x1 - _x2;
798  double dy = _y1 - _y2;
799  double norm = sqrt( dx*dx + dy*dy );
800  dx /= norm;
801  dy /= norm;
802  dx *= 10*_lineWidth;
803  dy *= 10*_lineWidth;
804 
805  // double back_x = 0.8 * dx + _x2;
806  // double back_y = 0.8 * dy + _y2;
807 
808  double ndx1 = dx*cos(0.3)-dy*sin(0.3);
809  double ndy1 = dx*sin(0.3)+dy*cos(0.3);
810  double ndx2 = dx*cos(-0.3)-dy*sin(-0.3);
811  double ndy2 = dx*sin(-0.3)+dy*cos(-0.3);
812 
813  stream << "\n% Arrow\n";
814  stream << _penColor.postscript() << " srgb "
815  << postscriptProperties() << " "
816  << "n "
817  << transform.mapX( _x1 ) << " "
818  << transform.mapY( _y1 ) << " "
819  << "m "
820  << transform.mapX( _x2 + ( dx * cos(0.3) ) ) << " "
821  << transform.mapY( _y2 + ( dy * cos(0.3) ) ) << " "
822  << "l stroke" << std::endl;
823 
824  if ( filled() ) {
825  stream << "n "
826  << transform.mapX( _x2 ) + transform.scale( ndx1 ) << " "
827  << transform.mapY( _y2 ) + transform.scale( ndy1 ) << " "
828  << "m "
829  << transform.mapX( _x2 ) << " "
830  << transform.mapY( _y2 ) << " l "
831  << transform.mapX( _x2 ) + transform.scale( ndx2 ) << " "
832  << transform.mapY( _y2 ) + transform.scale( ndy2 ) << " ";
833  stream << "l cp " << _penColor.postscript() << " srgb fill" << std::endl;
834  }
835 
836  stream << "n "
837  << transform.mapX( _x2 ) + transform.scale( ndx1 ) << " "
838  << transform.mapY( _y2 ) + transform.scale( ndy1 ) << " "
839  << "m "
840  << transform.mapX( _x2 ) << " "
841  << transform.mapY( _y2 ) << " l "
842  << transform.mapX( _x2 ) + transform.scale( ndx2 ) << " "
843  << transform.mapY( _y2 ) + transform.scale( ndy2 ) << " l"
844  << " " << _penColor.postscript() << " srgb cp [] 0 sd stroke" << std::endl;
845 }
std::string postscriptProperties() const
Definition: Shapes.cpp:141
std::string postscript() const
Definition: Color.cpp:132
bool filled() const
Definition: Board/Shapes.h:111
DGtal::Color _penColor
Definition: Board/Shapes.h:296
void LibBoard::Arrow::flushSVG ( std::ostream &  stream,
const TransformSVG transform 
) const
virtual

Writes the SVG code of the shape in a stream according to a transform.

Parameters
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Line.

Definition at line 881 of file Shapes.cpp.

References LibBoard::Shape::_fillColor, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Shape::_penColor, LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::TransformSVG::mapWidth(), LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Shape::SolidStyle, DGtal::Color::svg(), and DGtal::Color::svgAlpha().

883 {
884  double dx = _x1 - _x2;
885  double dy = _y1 - _y2;
886  double norm = sqrt( dx*dx + dy*dy );
887  dx /= norm;
888  dy /= norm;
889  dx *= 10 * _lineWidth;
890  dy *= 10 * _lineWidth;
891 
892  // double back_x = 0.8 * dx + _x2;
893  // double back_y = 0.8 * dy + _y2;
894 
895  double ndx1 = dx*cos(0.3)-dy*sin(0.3);
896  double ndy1 = dx*sin(0.3)+dy*cos(0.3);
897  double ndx2 = dx*cos(-0.3)-dy*sin(-0.3);
898  double ndy2 = dx*sin(-0.3)+dy*cos(-0.3);
899 
900  stream << "<g>" << std::endl;
901  // The line
902  stream << " <path "
903  << "d=\"M " << transform.mapX( _x1 ) << " " << transform.mapY( _y1 )
904  << " L " << transform.mapX( _x2 + ( dx * cos(0.3) ) )
905  << " " << transform.mapY( _y2 + ( dy * cos(0.3) ) ) << " z\""
906  << " fill=\"none\" stroke=\"" << _penColor.svg() << "\""
907  << _penColor.svgAlpha( " stroke" );
908  if ( _lineStyle != SolidStyle )
909  stream << " style=\"" << xFigDashStylesSVG[ _lineStyle ] << '"';
910  stream << " stroke-width=\"" << transform.mapWidth( _lineWidth ) << "mm\" />";
911 
912  // The arrow
913  stream << " <polygon";
914  stream << " fill=\"" << _fillColor.svg() << "\"";
915  stream << " stroke=\"" << _penColor.svg() << "\""
916  << " stroke-width=\"" << transform.mapWidth( /* 0.33 * */ _lineWidth ) << "mm\""
917  << " style=\"stroke-linecap:butt;stroke-linejoin:miter\""
918  << _fillColor.svgAlpha( " fill" )
919  << _penColor.svgAlpha( " stroke" )
920  << " points=\""
921  << transform.mapX( _x2 ) + transform.scale( ndx1 ) << ","
922  << transform.mapY( _y2 ) - transform.scale( ndy1 ) << " "
923  << transform.mapX( _x2 ) << ","
924  << transform.mapY( _y2 ) << " "
925  << transform.mapX( _x2 ) + transform.scale( ndx2 ) << ","
926  << transform.mapY( _y2 ) - transform.scale( ndy2 ) << " "
927  << transform.mapX( _x2 ) + transform.scale( ndx1 ) << ","
928  << transform.mapY( _y2 ) - transform.scale( ndy1 ) << "\" />" << std::endl;
929  stream << "</g>" << std::endl;
930 }
std::string svg() const
Definition: Color.cpp:140
DGtal::Color _penColor
Definition: Board/Shapes.h:296
LineStyle _lineStyle
Definition: Board/Shapes.h:299
DGtal::Color _fillColor
Definition: Board/Shapes.h:297
std::string svgAlpha(const char *aPrefix) const
Definition: Color.cpp:149
void LibBoard::Arrow::flushTikZ ( std::ostream &  stream,
const TransformTikZ transform 
) const
virtual

Writes the TikZ code of the shape in a stream according to a transform.

Parameters
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Line.

Definition at line 1003 of file Shapes.cpp.

References LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), and LibBoard::Shape::tikzProperties().

1005 {
1006  //stream << "\\path[-triangle 45," << tikzProperties(transform) << "] (" // Requires \usetikzlibrary{arrows}
1007  stream << "\\path[-latex," << tikzProperties(transform) << "] ("
1008  << transform.mapX( _x1 ) << ',' << transform.mapY( _y1 )
1009  << ") -- ("
1010  << transform.mapX( _x2 ) << ',' << transform.mapY( _y2 )
1011  << ");" << std::endl;
1012 }
std::string tikzProperties(const TransformTikZ &transform) const
Definition: Shapes.cpp:178
const std::string & LibBoard::Arrow::name ( ) const
virtual

Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)

Returns
object name

Reimplemented from LibBoard::Line.

Definition at line 734 of file Shapes.cpp.

References _name.

735 {
736  return _name;
737 }
static const std::string _name
Definition: Board/Shapes.h:758
Arrow LibBoard::Arrow::rotated ( double  angle,
const Point center 
) const

Returns a copy of the arrow, rotated around a given rotation center.

Parameters
angleThe rotation angle.
centerThe center of rotation.
Returns
The rotated copy of the line.

Definition at line 740 of file Shapes.cpp.

References LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Point::get(), and LibBoard::Point::rotate().

741 {
742  Arrow res(*this);
743  Point( _x1, _y1 ).rotate( angle, rotCenter ).get( res._x1, res._y1 );
744  Point( _x2, _y2 ).rotate( angle, rotCenter ).get( res._x2, res._y2 );
745  return res;
746 }
Arrow(double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
Arrow LibBoard::Arrow::rotated ( double  angle) const

Returns a copy of the arrow, rotated around its center.

Parameters
angleThe angle of rotation.
Returns
A copy of the lines, rotated around its center by the given angle.

Definition at line 749 of file Shapes.cpp.

References LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Line::center(), LibBoard::Point::get(), and LibBoard::Point::rotate().

750 {
751  Arrow res(*this);
752  Point c = center();
753  Point( _x1, _y1 ).rotate( angle, c ).get( res._x1, res._y1 );
754  Point( _x2, _y2 ).rotate( angle, c ).get( res._x2, res._y2 );
755  return res;
756 }
Arrow(double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
Point center() const
Definition: Shapes.cpp:403
Arrow LibBoard::Arrow::scaled ( double  sx,
double  sy 
) const

Returns a scaled copy of the arrow.

Parameters
sxScale factor along the x axis.
syScale factor along the y axis.
Returns
A scaled copy of the arrow.

Definition at line 770 of file Shapes.cpp.

References LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, LibBoard::Line::_y2, LibBoard::Line::center(), LibBoard::Line::translate(), LibBoard::Point::x, and LibBoard::Point::y.

Referenced by scaled().

771 {
772  Arrow res(*this);
773  Point c = center();
774  res._x1 *= sx;
775  res._x2 *= sx;
776  res._y1 *= sy;
777  res._y2 *= sy;
778  Point delta = c - res.center();
779  return static_cast<Arrow &>( res.translate( delta.x, delta.y ) );
780 }
Arrow(double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
Point center() const
Definition: Shapes.cpp:403
Arrow LibBoard::Arrow::scaled ( double  s) const

Definition at line 783 of file Shapes.cpp.

References scaled().

784 {
785  return Arrow::scaled( s, s );
786 }
Arrow scaled(double sx, double sy) const
Definition: Shapes.cpp:770
Arrow LibBoard::Arrow::translated ( double  dx,
double  dy 
) const

Returns a translated copy of the arrow.

Parameters
dxThe shift along the x axis.
dyThe shift along the y axis.
Returns
A translated copy of the line.

Definition at line 759 of file Shapes.cpp.

References LibBoard::Line::_x1, LibBoard::Line::_x2, LibBoard::Line::_y1, and LibBoard::Line::_y2.

760 {
761  Arrow res(*this);
762  res._x1 += dx;
763  res._x2 += dx;
764  res._y1 += dy;
765  res._y2 += dy;
766  return res;
767 }
Arrow(double x1, double y1, double x2, double y2, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)

Field Documentation

const std::string LibBoard::Arrow::_name
staticprivate

The generic name of the shape.

Definition at line 758 of file Board/Shapes.h.

Referenced by name().


The documentation for this struct was generated from the following files: