PCL
Graphics.h
Go to the documentation of this file.
1 // ____ ______ __
2 // / __ \ / ____// /
3 // / /_/ // / / /
4 // / ____// /___ / /___ PixInsight Class Library
5 // /_/ \____//_____/ PCL 2.7.0
6 // ----------------------------------------------------------------------------
7 // pcl/Graphics.h - Released 2024-06-18T15:48:54Z
8 // ----------------------------------------------------------------------------
9 // This file is part of the PixInsight Class Library (PCL).
10 // PCL is a multiplatform C++ framework for development of PixInsight modules.
11 //
12 // Copyright (c) 2003-2024 Pleiades Astrophoto S.L. All Rights Reserved.
13 //
14 // Redistribution and use in both source and binary forms, with or without
15 // modification, is permitted provided that the following conditions are met:
16 //
17 // 1. All redistributions of source code must retain the above copyright
18 // notice, this list of conditions and the following disclaimer.
19 //
20 // 2. All redistributions in binary form must reproduce the above copyright
21 // notice, this list of conditions and the following disclaimer in the
22 // documentation and/or other materials provided with the distribution.
23 //
24 // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names
25 // of their contributors, may be used to endorse or promote products derived
26 // from this software without specific prior written permission. For written
27 // permission, please contact info@pixinsight.com.
28 //
29 // 4. All products derived from this software, in any form whatsoever, must
30 // reproduce the following acknowledgment in the end-user documentation
31 // and/or other materials provided with the product:
32 //
33 // "This product is based on software from the PixInsight project, developed
34 // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)."
35 //
36 // Alternatively, if that is where third-party acknowledgments normally
37 // appear, this acknowledgment must be reproduced in the product itself.
38 //
39 // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS
40 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
41 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS
43 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS
45 // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE,
46 // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 // POSSIBILITY OF SUCH DAMAGE.
50 // ----------------------------------------------------------------------------
51 
52 #ifndef __PCL_Graphics_h
53 #define __PCL_Graphics_h
54 
56 
57 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
58 
59 #include <pcl/Defs.h>
60 
61 #include <pcl/Brush.h>
62 #include <pcl/Font.h>
63 #include <pcl/Matrix.h>
64 #include <pcl/Pen.h>
65 #include <pcl/Rectangle.h>
66 #include <pcl/TextAlign.h>
67 #include <pcl/UIObject.h>
68 
69 #ifndef __PCL_GRAPHICS_DONT_REMOVE_PREVIOUS_DECLARATIONS
70 
71 // Remove conflicting identifiers from Win32 SDK headers.
72 // If more conflicts arise, fix *all* of them *here only*.
73 #ifdef DrawText
74 #undef DrawText
75 #endif
76 
77 #endif // !__PCL_GRAPHICS_DONT_REMOVE_PREVIOUS_DECLARATIONS
78 
79 #endif // !__PCL_BUILDING_PIXINSIGHT_APPLICATION
80 
81 namespace pcl
82 {
83 
84 // ----------------------------------------------------------------------------
85 
134 namespace CompositionOp
135 {
136  enum value_type
137  {
138  Clear, // 0
139  Source, // A
140  Destination, // B
141  SourceOver, // A over B
142  DestinationOver, // B over A
143  SourceIn, // A in B
144  DestinationIn, // B in A
145  SourceOut, // A out B
146  DestinationOut, // B out A
147  SourceAtop, // A atop B
148  DestinationAtop, // B atop A
149  Xor, // A xor B
150  Min, // Min( A, B )
151  Max, // Max( A, B )
152  Add, // A + B
153  Multiply, // A * B
154  Screen, // ~A * ~B
155  Overlay, // (A > 0.5) ? ~(~(2*(A - 0.5)) * ~B) : 2*A*B
156  ColorDodge, // A/~B
157  ColorBurn, // ~(~A/B)
158  HardLight, // (B > 0.5) ? ~(~A * ~(2*(B - 0.5))) : A*2*B
159  SoftLight, // (B > 0.5) ? ~(~A * ~(B - 0.5)) : A*(B + 0.5)
160  Difference, // Abs( A - B )
161  Exclusion, // 0.5 - 2*(A - 0.5)*(B - 0.5)
162 
163  NumberOfCompositionOps
164  };
165 }
166 
167 // ----------------------------------------------------------------------------
168 
178 namespace FillRule
179 {
180  enum value_type
181  {
182  OddEven, // Odd-even (or parity, alternate) polygon fill rule
183  Winding, // Nonzero winding polygon fill rule
184 
185  NumberOfFillRules
186  };
187 }
188 
189 // ----------------------------------------------------------------------------
190 
191 #ifndef __PCL_BUILDING_PIXINSIGHT_APPLICATION
192 
193 class Control;
194 class Bitmap;
195 class SVG;
196 
197 // ----------------------------------------------------------------------------
198 
207 class PCL_CLASS GraphicsContextBase : public UIObject
208 {
209 public:
210 
214  using composition_op = CompositionOp::value_type;
215 
219  using fill_rule = FillRule::value_type;
220 
225 
235 
241 
247 
252  : UIObject( std::move( x ) )
253  {
254  }
255 
261  {
262  if ( !IsNull() )
263  if ( IsPainting() )
264  EndPaint();
265  }
266 
271  {
272  Transfer( x );
273  return *this;
274  }
275 
283  void EnsureUnique() override
284  {
285  }
286 
293  bool BeginPaint( Control& control );
294 
298  bool BeginPaint( Bitmap& bitmap );
299 
303  bool BeginPaint( SVG& svg );
304 
308  bool IsPainting() const;
309 
313  void EndPaint();
314 
318 
321  void EnableTransformation( bool = true );
322 
325  void DisableTransformation( bool disable = true )
326  {
327  EnableTransformation( !disable );
328  }
329 
333 
336  void SetTransformationMatrix( const Matrix& M );
337 
340  void SetTransformationMatrix( double m11, double m12, double m13,
341  double m21, double m22, double m23,
342  double m31, double m32, double m33 )
343  {
344  SetTransformationMatrix( Matrix( m11, m12, m13, m21, m22, m23, m31, m32, m33 ) );
345  }
346 
350 
353  void MultiplyTransformationMatrix( double m11, double m12, double m13,
354  double m21, double m22, double m23,
355  double m31, double m32, double m33 )
356  {
357  MultiplyTransformationMatrix( Matrix( m11, m12, m13, m21, m22, m23, m31, m32, m33 ) );
358  }
359 
362  void RotateTransformation( double angleRadians );
363 
366  void ScaleTransformation( double xScale, double yScale );
367 
370  void ScaleTransformation( double scale )
371  {
372  ScaleTransformation( scale, scale );
373  }
374 
377  void TranslateTransformation( double dx, double dy );
378 
381  void TranslateTransformation( double d )
382  {
383  TranslateTransformation( d, d );
384  }
385 
388  void ShearTransformation( double sx, double sy );
389 
392  void ShearTransformation( double s )
393  {
394  ShearTransformation( s, s );
395  }
396 
400 
403  void Transform( double& x, double& y ) const;
404 
407  void Transform( DPoint* p, size_type n ) const;
408 
411  void Transform( Array<DPoint>& a ) const
412  {
413  Transform( a.Begin(), a.Length() );
414  }
415 
418  DPoint Transformed( const DPoint& p ) const
419  {
420  DPoint p1( p );
421  Transform( p1.x, p1.y );
422  return p1;
423  }
424 
427  DRect Transformed( const DRect& r ) const
428  {
429  DRect r1( r );
430  Transform( r1.x0, r1.y0 );
431  Transform( r1.x1, r1.y1 );
432  return r1;
433  }
434 
438  {
439  Array<DPoint> a1( a );
440  Transform( a1 );
441  return a1;
442  }
443 
446  bool IsClippingEnabled() const;
447 
450  void EnableClipping( bool = true );
451 
454  void DisableClipping( bool disable = true )
455  {
456  EnableClipping( !disable );
457  }
458 
461  bool IsAntialiasingEnabled() const;
462 
465  void EnableAntialiasing( bool = true );
466 
469  void DisableAntialiasing( bool disable = true )
470  {
471  EnableAntialiasing( !disable );
472  }
473 
477 
480  void EnableTextAntialiasing( bool = true );
481 
484  void DisableTextAntialiasing( bool disable = true )
485  {
486  EnableTextAntialiasing( !disable );
487  }
488 
492 
495  void EnableSmoothInterpolation( bool = true );
496 
499  void DisableSmoothInterpolation( bool disable = true )
500  {
501  EnableSmoothInterpolation( !disable );
502  }
503 
506  composition_op CompositionOperator() const;
507 
510  void SetCompositionOperator( composition_op );
511 
515  {
516  SetCompositionOperator( CompositionOp::SourceOver );
517  }
518 
521  double Opacity() const;
522 
525  void SetOpacity( double op );
526 
530 
534 
538 
541  bool IsOpaqueBackground() const
542  {
543  return !IsTransparentBackground();
544  }
545 
548  void SetTransparentBackground( bool = true );
549 
552  void SetOpaqueBackground( bool opaque = true )
553  {
554  SetTransparentBackground( !opaque );
555  }
556 
559  pcl::Pen Pen() const;
560 
564  pcl::Pen GetPen() const
565  {
566  return this->Pen();
567  }
568 
571  void SetPen( const pcl::Pen& );
572 
575  void SetPen( RGBA color, float width )
576  {
577  SetPen( pcl::Pen( color, width ) );
578  }
579 
582  pcl::Brush Brush() const;
583 
588  {
589  return this->Brush();
590  }
591 
594  void SetBrush( const pcl::Brush& );
595 
598  pcl::Font Font() const;
599 
604  {
605  return this->Font();
606  }
607 
610  void SetFont( const pcl::Font& );
611 
614  void PushState();
615 
618  void PopState();
619 
620 protected:
621 
625  GraphicsContextBase( void* h ) : UIObject( h )
626  {
627  }
628 
629 private:
630 
631  void* CloneHandle() const override;
632 };
633 
634 // ----------------------------------------------------------------------------
635 
645 class PCL_CLASS Graphics : public GraphicsContextBase
646 {
647 public:
648 
652  using composition_op = GraphicsContextBase::composition_op;
653 
658 
662  Graphics() = default;
663 
672  Graphics( Control& control )
673  : GraphicsContextBase( control )
674  {
675  }
676 
681  Graphics( Bitmap& bitmap )
682  : GraphicsContextBase( bitmap )
683  {
684  }
685 
690  Graphics( SVG& svg )
691  : GraphicsContextBase( svg )
692  {
693  }
694 
699  : GraphicsContextBase( std::move( x ) )
700  {
701  }
702 
707  ~Graphics() override
708  {
709  }
710 
714  Graphics& operator =( Graphics&& x )
715  {
716  Transfer( x );
717  return *this;
718  }
719 
725  static Graphics& Null();
726 
730 
733  void SetClipRect( const pcl::Rect& r )
734  {
735  SetClipRect( r.x0, r.y0, r.x1, r.y1 );
736  }
737 
740  void SetClipRect( int x0, int y0, int x1, int y1 );
741 
744  void IntersectClipRect( const pcl::Rect& r )
745  {
746  SetClipRect( ClipRect().Intersection( r ) );
747  }
748 
751  void IntersectClipRect( int x0, int y0, int x1, int y1 )
752  {
753  IntersectClipRect( pcl::Rect( x0, y0, x1, y1 ) );
754  }
755 
758  void UniteClipRect( const pcl::Rect& r )
759  {
760  SetClipRect( ClipRect().Union( r ) );
761  }
762 
765  void UniteClipRect( int x0, int y0, int x1, int y1 )
766  {
767  UniteClipRect( pcl::Rect( x0, y0, x1, y1 ) );
768  }
769 
773 
776  void SetBrushOrigin( const pcl::Point& p )
777  {
778  SetBrushOrigin( p.x, p.y );
779  }
780 
783  void SetBrushOrigin( int x, int y );
784 
787  void DrawPoint( const pcl::Point& p )
788  {
789  DrawPoint( p.x, p.y );
790  }
791 
794  void DrawPoint( int x, int y );
795 
798  void DrawLine( const pcl::Point& p0, const pcl::Point& p1 )
799  {
800  DrawLine( p0.x, p0.y, p1.x, p1.y );
801  }
802 
805  void DrawLine( int x0, int y0, int x1, int y1 );
806 
809  void DrawRect( int x0, int y0, int x1, int y1 );
810 
813  void DrawRect( const pcl::Rect& r )
814  {
815  DrawRect( r.x0, r.y0, r.x1, r.y1 );
816  }
817 
820  void StrokeRect( int x0, int y0, int x1, int y1, const pcl::Pen& pen = pcl::Pen::Null() );
821 
824  void StrokeRect( const pcl::Rect& r, const pcl::Pen& pen = pcl::Pen::Null() )
825  {
826  StrokeRect( r.x0, r.y0, r.x1, r.y1, pen );
827  }
828 
831  void FillRect( int x0, int y0, int x1, int y1, const pcl::Brush& brush = pcl::Brush::Null() );
832 
835  void FillRect( const pcl::Rect& r, const pcl::Brush& brush = pcl::Brush::Null() )
836  {
837  FillRect( r.x0, r.y0, r.x1, r.y1, brush );
838  }
839 
842  void EraseRect( int x0, int y0, int x1, int y1 )
843  {
844  FillRect( x0, y0, x1, y1, BackgroundBrush() );
845  }
846 
849  void EraseRect( const pcl::Rect& r )
850  {
851  EraseRect( r.x0, r.y0, r.x1, r.y1 );
852  }
853 
856  void DrawRoundedRect( int x0, int y0, int x1, int y1, double rx, double ry );
857 
860  void DrawRoundedRect( int x0, int y0, int x1, int y1, double rxy = 25 )
861  {
862  DrawRoundedRect( x0, y0, x1, y1, rxy, rxy );
863  }
864 
867  void DrawRoundedRect( const pcl::Rect& r, double rx, double ry )
868  {
869  DrawRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry );
870  }
871 
874  void DrawRoundedRect( const pcl::Rect& r, double rxy = 25 )
875  {
876  DrawRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy );
877  }
878 
881  void StrokeRoundedRect( int x0, int y0, int x1, int y1, double rx, double ry, const pcl::Pen& pen = pcl::Pen::Null() );
882 
885  void StrokeRoundedRect( int x0, int y0, int x1, int y1, double rxy = 25, const pcl::Pen& pen = pcl::Pen::Null() )
886  {
887  StrokeRoundedRect( x0, y0, x1, y1, rxy, rxy, pen );
888  }
889 
892  void StrokeRoundedRect( const pcl::Rect& r, double rx, double ry, const pcl::Pen& pen = pcl::Pen::Null() )
893  {
894  StrokeRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry, pen );
895  }
896 
899  void StrokeRoundedRect( const pcl::Rect& r, double rxy = 25, const pcl::Pen& pen = pcl::Pen::Null() )
900  {
901  StrokeRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy, pen );
902  }
903 
906  void FillRoundedRect( int x0, int y0, int x1, int y1, double rx, double ry, const pcl::Brush& brush = pcl::Brush::Null() );
907 
910  void FillRoundedRect( int x0, int y0, int x1, int y1, double rxy = 25, const pcl::Brush& brush = pcl::Brush::Null() )
911  {
912  FillRoundedRect( x0, y0, x1, y1, rxy, rxy, brush );
913  }
914 
917  void FillRoundedRect( const pcl::Rect& r, double rx, double ry, const pcl::Brush& brush = pcl::Brush::Null() )
918  {
919  FillRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry, brush );
920  }
921 
924  void FillRoundedRect( const pcl::Rect& r, double rxy = 25, const pcl::Brush& brush = pcl::Brush::Null() )
925  {
926  FillRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy, brush );
927  }
928 
931  void EraseRoundedRect( int x0, int y0, int x1, int y1, double rx, double ry )
932  {
933  FillRoundedRect( x0, y0, x1, y1, rx, ry, BackgroundBrush() );
934  }
935 
938  void EraseRoundedRect( int x0, int y0, int x1, int y1, double rxy = 25 )
939  {
940  EraseRoundedRect( x0, y0, x1, y1, rxy, rxy );
941  }
942 
945  void EraseRoundedRect( const pcl::Rect& r, double rx, double ry )
946  {
947  EraseRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry );
948  }
949 
952  void EraseRoundedRect( const pcl::Rect& r, double rxy = 25 )
953  {
954  EraseRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy );
955  }
956 
959  void DrawEllipse( int x0, int y0, int x1, int y1 );
960 
963  void DrawEllipse( const pcl::Rect& r )
964  {
965  DrawEllipse( r.x0, r.y0, r.x1, r.y1 );
966  }
967 
970  void StrokeEllipse( int x0, int y0, int x1, int y1, const pcl::Pen& pen = pcl::Pen::Null() );
971 
974  void StrokeEllipse( const pcl::Rect& r, const pcl::Pen& pen = pcl::Pen::Null() )
975  {
976  StrokeEllipse( r.x0, r.y0, r.x1, r.y1, pen );
977  }
978 
981  void FillEllipse( int x0, int y0, int x1, int y1, const pcl::Brush& brush = pcl::Brush::Null() );
982 
985  void FillEllipse( const pcl::Rect& r, const pcl::Brush& brush = pcl::Brush::Null() )
986  {
987  FillEllipse( r.x0, r.y0, r.x1, r.y1, brush );
988  }
989 
992  void EraseEllipse( int x0, int y0, int x1, int y1 )
993  {
994  FillEllipse( x0, y0, x1, y1, BackgroundBrush() );
995  }
996 
999  void EraseEllipse( const pcl::Rect& r )
1000  {
1001  EraseEllipse( r.x0, r.y0, r.x1, r.y1 );
1002  }
1003 
1006  void DrawCircle( int xc, int yc, int r )
1007  {
1008  DrawEllipse( xc-r, yc-r, xc+r+1, yc+r+1 );
1009  }
1010 
1013  void DrawCircle( const pcl::Point& c, int r )
1014  {
1015  DrawCircle( c.x, c.y, r );
1016  }
1017 
1020  void StrokeCircle( int xc, int yc, int r, const pcl::Pen& pen = pcl::Pen::Null() )
1021  {
1022  StrokeEllipse( xc-r, yc-r, xc+r+1, yc+r+1, pen );
1023  }
1024 
1027  void StrokeCircle( const pcl::Point& c, int r, const pcl::Pen& pen = pcl::Pen::Null() )
1028  {
1029  StrokeCircle( c.x, c.y, r, pen );
1030  }
1031 
1034  void FillCircle( int xc, int yc, int r, const pcl::Brush& brush = pcl::Brush::Null() )
1035  {
1036  FillEllipse( xc-r, yc-r, xc+r+1, yc+r+1, brush );
1037  }
1038 
1041  void FillCircle( const pcl::Point& c, int r, const pcl::Brush& brush = pcl::Brush::Null() )
1042  {
1043  FillCircle( c.x, c.y, r, brush );
1044  }
1045 
1048  void EraseCircle( int xc, int yc, int r )
1049  {
1050  FillCircle( xc, yc, r, BackgroundBrush() );
1051  }
1052 
1055  void EraseCircle( const pcl::Point& c, int r )
1056  {
1057  EraseCircle( c.x, c.y, r );
1058  }
1059 
1062  void DrawPolygon( const pcl::Point* p, size_type n, fill_rule rule = FillRule::OddEven );
1063 
1066  template <class C>
1067  void DrawPolygon( const C& c, fill_rule rule = FillRule::OddEven )
1068  {
1069  DrawPolygon( c.Begin(), c.Length(), rule );
1070  }
1071 
1074  void StrokePolygon( const pcl::Point* p, size_type n, const pcl::Pen& pen = pcl::Pen::Null(), fill_rule rule = FillRule::OddEven );
1075 
1078  template <class C>
1079  void StrokePolygon( const C& c, const pcl::Pen& pen = pcl::Pen::Null(), fill_rule rule = FillRule::OddEven )
1080  {
1081  StrokePolygon( c.Begin(), c.Length(), pen, rule );
1082  }
1083 
1086  void FillPolygon( const pcl::Point* p, size_type n, const pcl::Brush& brush = pcl::Brush::Null(), fill_rule rule = FillRule::OddEven );
1087 
1090  template <class C>
1091  void FillPolygon( const C& c, const pcl::Brush& brush = pcl::Brush::Null(), fill_rule rule = FillRule::OddEven )
1092  {
1093  FillPolygon( c.Begin(), c.Length(), brush, rule );
1094  }
1095 
1098  void ErasePolygon( const pcl::Point* p, size_type n, fill_rule rule = FillRule::OddEven )
1099  {
1100  FillPolygon( p, n, BackgroundBrush(), rule );
1101  }
1102 
1105  template <class C>
1106  void ErasePolygon( const C& c, fill_rule rule = FillRule::OddEven )
1107  {
1108  ErasePolygon( c.Begin(), c.Length(), rule );
1109  }
1110 
1113  void DrawPolyline( const pcl::Point*, size_type n );
1114 
1117  template <class C>
1118  void DrawPolyline( const C& c )
1119  {
1120  DrawPolyline( c.Begin(), c.Length() );
1121  }
1122 
1125  void DrawEllipticArc( int x0, int y0, int x1, int y1, double start, double span );
1126 
1129  void DrawEllipticArc( const pcl::Rect& r, double start, double span )
1130  {
1131  DrawEllipticArc( r.x0, r.y0, r.x1, r.y1, start, span );
1132  }
1133 
1136  void DrawArc( int xc, int yc, int r, double start, double span )
1137  {
1138  DrawEllipticArc( xc-r, yc-r, xc+r+1, yc+r+1, start, span );
1139  }
1140 
1143  void DrawArc( const pcl::Point& c, int r, double start, double span )
1144  {
1145  DrawArc( c.x, c.y, r, start, span );
1146  }
1147 
1150  void DrawEllipticChord( int x0, int y0, int x1, int y1, double start, double span );
1151 
1154  void DrawEllipticChord( const pcl::Rect& r, double start, double span )
1155  {
1156  DrawEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span );
1157  }
1158 
1161  void StrokeEllipticChord( int x0, int y0, int x1, int y1, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() );
1162 
1165  void StrokeEllipticChord( const pcl::Rect& r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1166  {
1167  StrokeEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span, pen );
1168  }
1169 
1172  void FillEllipticChord( int x0, int y0, int x1, int y1, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() );
1173 
1176  void FillEllipticChord( const pcl::Rect& r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1177  {
1178  FillEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span, brush );
1179  }
1180 
1183  void EraseEllipticChord( int x0, int y0, int x1, int y1, double start, double span )
1184  {
1185  FillEllipticChord( x0, y0, x1, y1, start, span, BackgroundBrush() );
1186  }
1187 
1190  void EraseEllipticChord( const pcl::Rect& r, double start, double span )
1191  {
1192  EraseEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span );
1193  }
1194 
1197  void DrawChord( int xc, int yc, int r, double start, double span )
1198  {
1199  DrawEllipticChord( xc-r, yc-r, xc+r+1, yc+r+1, start, span );
1200  }
1201 
1204  void DrawChord( const pcl::Point& c, int r, double start, double span )
1205  {
1206  DrawChord( c.x, c.y, r, start, span );
1207  }
1208 
1211  void StrokeChord( int xc, int yc, int r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1212  {
1213  StrokeEllipticChord( xc-r, yc-r, xc+r+1, yc+r+1, start, span, pen );
1214  }
1215 
1218  void StrokeChord( const pcl::Point& c, int r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1219  {
1220  StrokeChord( c.x, c.y, r, start, span, pen );
1221  }
1222 
1225  void FillChord( int xc, int yc, int r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1226  {
1227  FillEllipticChord( xc-r, yc-r, xc+r+1, yc+r+1, start, span, brush );
1228  }
1229 
1232  void FillChord( const pcl::Point& c, int r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1233  {
1234  FillChord( c.x, c.y, r, start, span, brush );
1235  }
1236 
1239  void EraseChord( int xc, int yc, int r, double start, double span )
1240  {
1241  FillChord( xc, yc, r, start, span, BackgroundBrush() );
1242  }
1243 
1246  void EraseChord( const pcl::Point& c, int r, double start, double span )
1247  {
1248  EraseChord( c.x, c.y, r, start, span );
1249  }
1250 
1253  void DrawEllipticPie( int x0, int y0, int x1, int y1, double start, double span );
1254 
1257  void DrawEllipticPie( const pcl::Rect& r, double start, double span )
1258  {
1259  DrawEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span );
1260  }
1261 
1264  void StrokeEllipticPie( int x0, int y0, int x1, int y1, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() );
1265 
1268  void StrokeEllipticPie( const pcl::Rect& r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1269  {
1270  StrokeEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span, pen );
1271  }
1272 
1275  void FillEllipticPie( int x0, int y0, int x1, int y1, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() );
1276 
1279  void FillEllipticPie( const pcl::Rect& r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1280  {
1281  FillEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span, brush );
1282  }
1283 
1286  void EraseEllipticPie( int x0, int y0, int x1, int y1, double start, double span )
1287  {
1288  FillEllipticPie( x0, y0, x1, y1, start, span, BackgroundBrush() );
1289  }
1290 
1293  void EraseEllipticPie( const pcl::Rect& r, double start, double span )
1294  {
1295  EraseEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span );
1296  }
1297 
1300  void DrawPie( int xc, int yc, int r, double start, double span )
1301  {
1302  DrawEllipticPie( xc-r, yc-r, xc+r+1, yc+r+1, start, span );
1303  }
1304 
1307  void DrawPie( const pcl::Point& c, int r, double start, double span )
1308  {
1309  DrawPie( c.x, c.y, r, start, span );
1310  }
1311 
1314  void StrokePie( int xc, int yc, int r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1315  {
1316  StrokeEllipticPie( xc-r, yc-r, xc+r+1, yc+r+1, start, span, pen );
1317  }
1318 
1321  void StrokePie( const pcl::Point& c, int r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
1322  {
1323  StrokePie( c.x, c.y, r, start, span, pen );
1324  }
1325 
1328  void FillPie( int xc, int yc, int r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1329  {
1330  FillEllipticPie( xc-r, yc-r, xc+r+1, yc+r+1, start, span, brush );
1331  }
1332 
1335  void FillPie( const pcl::Point& c, int r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
1336  {
1337  FillPie( c.x, c.y, r, start, span, brush );
1338  }
1339 
1342  void ErasePie( int xc, int yc, int r, double start, double span )
1343  {
1344  FillPie( xc, yc, r, start, span, BackgroundBrush() );
1345  }
1346 
1349  void ErasePie( const pcl::Point& c, int r, double start, double span )
1350  {
1351  ErasePie( c.x, c.y, r, start, span );
1352  }
1353 
1356  void DrawBitmap( int x, int y, const Bitmap& );
1357 
1360  void DrawBitmap( const pcl::Point& p, const Bitmap& bm )
1361  {
1362  DrawBitmap( p.x, p.y, bm );
1363  }
1364 
1367  void DrawBitmapRect( int x, int y, const Bitmap&, int x0, int y0, int x1, int y1 );
1368 
1371  void DrawBitmapRect( const pcl::Point& p, const Bitmap& bm, const pcl::Rect& r )
1372  {
1373  DrawBitmapRect( p.x, p.y, bm, r.x0, r.y0, r.x1, r.y1 );
1374  }
1375 
1378  void DrawScaledBitmap( int x0, int y0, int x1, int y1, const Bitmap& );
1379 
1382  void DrawScaledBitmap( const pcl::Rect& r, const Bitmap& bm )
1383  {
1384  DrawScaledBitmap( r.x0, r.y0, r.x1, r.y1, bm );
1385  }
1386 
1389  void DrawScaledBitmapRect( int dx0, int dy0, int dx1, int dy1, const Bitmap&, int sx0, int sy0, int sx1, int sy1 );
1390 
1393  void DrawScaledBitmapRect( const pcl::Rect& dst, const Bitmap& bm, const pcl::Rect& src )
1394  {
1395  DrawScaledBitmapRect( dst.x0, dst.y0, dst.x1, dst.y1, bm, src.x0, src.y0, src.x1, src.y1 );
1396  }
1397 
1400  void DrawTiledBitmap( int x0, int y0, int x1, int y1, const Bitmap&, int xOffset = 0, int yOffset = 0 );
1401 
1404  void DrawTiledBitmap( const pcl::Rect& r, const Bitmap& bm, const pcl::Point& offset = pcl::Point( 0 ) )
1405  {
1406  DrawTiledBitmap( r.x0, r.y0, r.x1, r.y1, bm, offset.x, offset.y );
1407  }
1408 
1411  void DrawText( int x, int y, const String& );
1412 
1415  void DrawText( const pcl::Point& p, const String& s )
1416  {
1417  DrawText( p.x, p.y, s );
1418  }
1419 
1422  void DrawTextRect( int x0, int y0, int x1, int y1, const String&, TextAlignmentFlags = TextAlign::Default );
1423 
1426  void DrawTextRect( const pcl::Rect r, const String& s, TextAlignmentFlags a = TextAlign::Default )
1427  {
1428  DrawTextRect( r.x0, r.y0, r.x1, r.y1, s, a );
1429  }
1430 
1433  pcl::Rect TextRect( int x0, int y0, int x1, int y1, const String&, TextAlignmentFlags = TextAlign::Default ) const;
1434 
1437  pcl::Rect TextRect( const pcl::Rect r, const String& s, TextAlignmentFlags a = TextAlign::Default )
1438  {
1439  return TextRect( r.x0, r.y0, r.x1, r.y1, s, a );
1440  }
1441 
1442 private:
1443 
1444  Graphics( void* h ) : GraphicsContextBase( h )
1445  {
1446  }
1447 
1448  friend class InterfaceDispatcher;
1449 };
1450 
1451 // ----------------------------------------------------------------------------
1452 
1462 class PCL_CLASS VectorGraphics : public GraphicsContextBase
1463 {
1464 public:
1465 
1469  using composition_op = GraphicsContextBase::composition_op;
1470 
1475 
1479  VectorGraphics() = default;
1480 
1490  : GraphicsContextBase( control )
1491  {
1492  }
1493 
1499  : GraphicsContextBase( bitmap )
1500  {
1501  }
1502 
1508  : GraphicsContextBase( svg )
1509  {
1510  }
1511 
1516  : GraphicsContextBase( std::move( x ) )
1517  {
1518  }
1519 
1524  ~VectorGraphics() override
1525  {
1526  }
1527 
1531  VectorGraphics& operator =( VectorGraphics&& x )
1532  {
1533  Transfer( x );
1534  return *this;
1535  }
1536 
1543 
1547 
1550  template <class R>
1551  void SetClipRect( const R& r )
1552  {
1553  SetClipRect( r.x0, r.y0, r.x1, r.y1 );
1554  }
1555 
1558  void SetClipRect( double x0, double y0, double x1, double y1 );
1559 
1562  template <class R>
1563  void IntersectClipRect( const R& r )
1564  {
1565  SetClipRect( ClipRect().Intersection( r ) );
1566  }
1567 
1570  void IntersectClipRect( double x0, double y0, double x1, double y1 )
1571  {
1572  IntersectClipRect( pcl::DRect( x0, y0, x1, y1 ) );
1573  }
1574 
1577  template <class R>
1578  void UniteClipRect( const R& r )
1579  {
1580  SetClipRect( ClipRect().Union( r ) );
1581  }
1582 
1585  void UniteClipRect( double x0, double y0, double x1, double y1 )
1586  {
1587  UniteClipRect( pcl::DRect( x0, y0, x1, y1 ) );
1588  }
1589 
1593 
1596  template <class P>
1597  void SetBrushOrigin( const P& p )
1598  {
1599  SetBrushOrigin( p.x, p.y );
1600  }
1601 
1604  void SetBrushOrigin( double x, double y );
1605 
1608  template <class P>
1609  void DrawPoint( const P& p )
1610  {
1611  DrawPoint( p.x, p.y );
1612  }
1613 
1616  void DrawPoint( double x, double y );
1617 
1620  template <class P0, class P1>
1621  void DrawLine( const P0& p0, const P1& p1 )
1622  {
1623  DrawLine( p0.x, p0.y, p1.x, p1.y );
1624  }
1625 
1628  void DrawLine( double x0, double y0, double x1, double y1 );
1629 
1632  void DrawRect( double x0, double y0, double x1, double y1 );
1633 
1636  template <class R>
1637  void DrawRect( const R& r )
1638  {
1639  DrawRect( r.x0, r.y0, r.x1, r.y1 );
1640  }
1641 
1644  void StrokeRect( double x0, double y0, double x1, double y1, const pcl::Pen& pen = pcl::Pen::Null() );
1645 
1648  template <class R>
1649  void StrokeRect( const R& r, const pcl::Pen& pen = pcl::Pen::Null() )
1650  {
1651  StrokeRect( r.x0, r.y0, r.x1, r.y1, pen );
1652  }
1653 
1656  void FillRect( double x0, double y0, double x1, double y1, const pcl::Brush& brush = pcl::Brush::Null() );
1657 
1660  template <class R>
1661  void FillRect( const R& r, const pcl::Brush& brush = pcl::Brush::Null() )
1662  {
1663  FillRect( r.x0, r.y0, r.x1, r.y1, brush );
1664  }
1665 
1668  void EraseRect( double x0, double y0, double x1, double y1 )
1669  {
1670  FillRect( x0, y0, x1, y1, BackgroundBrush() );
1671  }
1672 
1675  template <class R>
1676  void EraseRect( const R& r )
1677  {
1678  EraseRect( r.x0, r.y0, r.x1, r.y1 );
1679  }
1680 
1683  void DrawRoundedRect( double x0, double y0, double x1, double y1, double rx, double ry );
1684 
1687  void DrawRoundedRect( double x0, double y0, double x1, double y1, double rxy = 25 )
1688  {
1689  DrawRoundedRect( x0, y0, x1, y1, rxy, rxy );
1690  }
1691 
1694  template <class R>
1695  void DrawRoundedRect( const R& r, double rx, double ry )
1696  {
1697  DrawRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry );
1698  }
1699 
1702  template <class R>
1703  void DrawRoundedRect( const R& r, double rxy = 25 )
1704  {
1705  DrawRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy );
1706  }
1707 
1710  void StrokeRoundedRect( double x0, double y0, double x1, double y1, double rx, double ry, const pcl::Pen& pen = pcl::Pen::Null() );
1711 
1714  void StrokeRoundedRect( double x0, double y0, double x1, double y1, double rxy = 25, const pcl::Pen& pen = pcl::Pen::Null() )
1715  {
1716  StrokeRoundedRect( x0, y0, x1, y1, rxy, rxy, pen );
1717  }
1718 
1721  template <class R>
1722  void StrokeRoundedRect( const R& r, double rx, double ry, const pcl::Pen& pen = pcl::Pen::Null() )
1723  {
1724  StrokeRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry, pen );
1725  }
1726 
1729  template <class R>
1730  void StrokeRoundedRect( const R& r, double rxy = 25, const pcl::Pen& pen = pcl::Pen::Null() )
1731  {
1732  StrokeRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy, pen );
1733  }
1734 
1737  void FillRoundedRect( double x0, double y0, double x1, double y1, double rx, double ry, const pcl::Brush& brush = pcl::Brush::Null() );
1738 
1741  void FillRoundedRect( double x0, double y0, double x1, double y1, double rxy = 25, const pcl::Brush& brush = pcl::Brush::Null() )
1742  {
1743  FillRoundedRect( x0, y0, x1, y1, rxy, rxy, brush );
1744  }
1745 
1748  template <class R>
1749  void FillRoundedRect( const R& r, double rx, double ry, const pcl::Brush& brush = pcl::Brush::Null() )
1750  {
1751  FillRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry, brush );
1752  }
1753 
1756  template <class R>
1757  void FillRoundedRect( const R& r, double rxy = 25, const pcl::Brush& brush = pcl::Brush::Null() )
1758  {
1759  FillRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy, brush );
1760  }
1761 
1764  void EraseRoundedRect( double x0, double y0, double x1, double y1, double rx, double ry )
1765  {
1766  FillRoundedRect( x0, y0, x1, y1, rx, ry, BackgroundBrush() );
1767  }
1768 
1771  void EraseRoundedRect( double x0, double y0, double x1, double y1, double rxy = 25 )
1772  {
1773  EraseRoundedRect( x0, y0, x1, y1, rxy, rxy );
1774  }
1775 
1778  template <class R>
1779  void EraseRoundedRect( const R& r, double rx, double ry )
1780  {
1781  EraseRoundedRect( r.x0, r.y0, r.x1, r.y1, rx, ry );
1782  }
1783 
1786  template <class R>
1787  void EraseRoundedRect( const R& r, double rxy = 25 )
1788  {
1789  EraseRoundedRect( r.x0, r.y0, r.x1, r.y1, rxy, rxy );
1790  }
1791 
1794  void DrawEllipse( double x0, double y0, double x1, double y1 );
1795 
1798  template <class R>
1799  void DrawEllipse( const R& r )
1800  {
1801  DrawEllipse( r.x0, r.y0, r.x1, r.y1 );
1802  }
1803 
1806  void StrokeEllipse( double x0, double y0, double x1, double y1, const pcl::Pen& pen = pcl::Pen::Null() );
1807 
1810  template <class R>
1811  void StrokeEllipse( const R& r, const pcl::Pen& pen = pcl::Pen::Null() )
1812  {
1813  StrokeEllipse( r.x0, r.y0, r.x1, r.y1, pen );
1814  }
1815 
1818  void FillEllipse( double x0, double y0, double x1, double y1, const pcl::Brush& brush = pcl::Brush::Null() );
1819 
1822  template <class R>
1823  void FillEllipse( const R& r, const pcl::Brush& brush = pcl::Brush::Null() )
1824  {
1825  FillEllipse( r.x0, r.y0, r.x1, r.y1, brush );
1826  }
1827 
1830  void EraseEllipse( double x0, double y0, double x1, double y1 )
1831  {
1832  FillEllipse( x0, y0, x1, y1, BackgroundBrush() );
1833  }
1834 
1837  template <class R>
1838  void EraseEllipse( const R& r )
1839  {
1840  EraseEllipse( r.x0, r.y0, r.x1, r.y1 );
1841  }
1842 
1845  void DrawCircle( double xc, double yc, double r )
1846  {
1847  DrawEllipse( xc-r, yc-r, xc+r, yc+r );
1848  }
1849 
1852  template <class P>
1853  void DrawCircle( const P& c, double r )
1854  {
1855  DrawCircle( c.x, c.y, r );
1856  }
1857 
1860  void StrokeCircle( double xc, double yc, double r, const pcl::Pen& pen = pcl::Pen::Null() )
1861  {
1862  StrokeEllipse( xc-r, yc-r, xc+r, yc+r, pen );
1863  }
1864 
1867  template <class P>
1868  void StrokeCircle( const P& c, double r, const pcl::Pen& pen = pcl::Pen::Null() )
1869  {
1870  StrokeCircle( c.x, c.y, r, pen );
1871  }
1872 
1875  void FillCircle( double xc, double yc, double r, const pcl::Brush& brush = pcl::Brush::Null() )
1876  {
1877  FillEllipse( xc-r, yc-r, xc+r, yc+r, brush );
1878  }
1879 
1882  template <class P>
1883  void FillCircle( const P& c, double r, const pcl::Brush& brush = pcl::Brush::Null() )
1884  {
1885  FillCircle( c.x, c.y, r, brush );
1886  }
1887 
1890  void EraseCircle( double xc, double yc, double r )
1891  {
1892  FillCircle( xc, yc, r, BackgroundBrush() );
1893  }
1894 
1897  template <class P>
1898  void EraseCircle( const P& c, double r )
1899  {
1900  EraseCircle( c.x, c.y, r );
1901  }
1902 
1905  void DrawPolygon( const pcl::DPoint* p, size_type n, fill_rule rule = FillRule::OddEven );
1906 
1909  template <class C>
1910  void DrawPolygon( const C& c, fill_rule rule = FillRule::OddEven )
1911  {
1912  DrawPolygon( c.Begin(), c.Length(), rule );
1913  }
1914 
1917  void StrokePolygon( const pcl::DPoint* p, size_type n, const pcl::Pen& pen = pcl::Pen::Null(), fill_rule rule = FillRule::OddEven );
1918 
1921  template <class C>
1922  void StrokePolygon( const C& c, const pcl::Pen& pen = pcl::Pen::Null(), fill_rule rule = FillRule::OddEven )
1923  {
1924  StrokePolygon( c.Begin(), c.Length(), pen, rule );
1925  }
1926 
1929  void FillPolygon( const pcl::DPoint* p, size_type n, const pcl::Brush& brush = pcl::Brush::Null(), fill_rule rule = FillRule::OddEven );
1930 
1933  template <class C>
1934  void FillPolygon( const C& c, const pcl::Brush& brush = pcl::Brush::Null(), fill_rule rule = FillRule::OddEven )
1935  {
1936  FillPolygon( c.Begin(), c.Length(), brush, rule );
1937  }
1938 
1941  void ErasePolygon( const pcl::DPoint* p, size_type n, fill_rule rule = FillRule::OddEven )
1942  {
1943  FillPolygon( p, n, BackgroundBrush(), rule );
1944  }
1945 
1948  template <class C>
1949  void ErasePolygon( const C& c, fill_rule rule = FillRule::OddEven )
1950  {
1951  ErasePolygon( c.Begin(), c.Length(), rule );
1952  }
1953 
1957 
1960  template <class C>
1961  void DrawPolyline( const C& c )
1962  {
1963  DrawPolyline( c.Begin(), c.Length() );
1964  }
1965 
1968  void DrawEllipticArc( double x0, double y0, double x1, double y1, double start, double span );
1969 
1972  template <class R>
1973  void DrawEllipticArc( const R& r, double start, double span )
1974  {
1975  DrawEllipticArc( r.x0, r.y0, r.x1, r.y1, start, span );
1976  }
1977 
1980  void DrawArc( double xc, double yc, double r, double start, double span )
1981  {
1982  DrawEllipticArc( xc-r, yc-r, xc+r, yc+r, start, span );
1983  }
1984 
1987  template <class P>
1988  void DrawArc( const P& c, double r, double start, double span )
1989  {
1990  DrawArc( c.x, c.y, r, start, span );
1991  }
1992 
1995  void DrawEllipticChord( double x0, double y0, double x1, double y1, double start, double span );
1996 
1999  template <class R>
2000  void DrawEllipticChord( const R& r, double start, double span )
2001  {
2002  DrawEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span );
2003  }
2004 
2007  void StrokeEllipticChord( double x0, double y0, double x1, double y1, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() );
2008 
2011  template <class R>
2012  void StrokeEllipticChord( const R& r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2013  {
2014  StrokeEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span, pen );
2015  }
2016 
2019  void FillEllipticChord( double x0, double y0, double x1, double y1, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() );
2020 
2023  template <class R>
2024  void FillEllipticChord( const R& r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2025  {
2026  FillEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span, brush );
2027  }
2028 
2031  void EraseEllipticChord( double x0, double y0, double x1, double y1, double start, double span )
2032  {
2033  FillEllipticChord( x0, y0, x1, y1, start, span, BackgroundBrush() );
2034  }
2035 
2038  template <class R>
2039  void EraseEllipticChord( const R& r, double start, double span )
2040  {
2041  EraseEllipticChord( r.x0, r.y0, r.x1, r.y1, start, span );
2042  }
2043 
2046  void DrawChord( double xc, double yc, double r, double start, double span )
2047  {
2048  DrawEllipticChord( xc-r, yc-r, xc+r, yc+r, start, span );
2049  }
2050 
2053  template <class P>
2054  void DrawChord( const P& c, double r, double start, double span )
2055  {
2056  DrawChord( c.x, c.y, r, start, span );
2057  }
2058 
2061  void StrokeChord( double xc, double yc, double r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2062  {
2063  StrokeEllipticChord( xc-r, yc-r, xc+r, yc+r, start, span, pen );
2064  }
2065 
2068  template <class P>
2069  void StrokeChord( const P& c, double r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2070  {
2071  StrokeChord( c.x, c.y, r, start, span, pen );
2072  }
2073 
2076  void FillChord( double xc, double yc, double r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2077  {
2078  FillEllipticChord( xc-r, yc-r, xc+r, yc+r, start, span, brush );
2079  }
2080 
2083  template <class P>
2084  void FillChord( const P& c, double r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2085  {
2086  FillChord( c.x, c.y, r, start, span, brush );
2087  }
2088 
2091  void EraseChord( double xc, double yc, double r, double start, double span )
2092  {
2093  FillChord( xc, yc, r, start, span, BackgroundBrush() );
2094  }
2095 
2098  template <class P>
2099  void EraseChord( const P& c, double r, double start, double span )
2100  {
2101  EraseChord( c.x, c.y, r, start, span );
2102  }
2103 
2106  void DrawEllipticPie( double x0, double y0, double x1, double y1, double start, double span );
2107 
2110  template <class R>
2111  void DrawEllipticPie( const R& r, double start, double span )
2112  {
2113  DrawEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span );
2114  }
2115 
2118  void StrokeEllipticPie( double x0, double y0, double x1, double y1, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() );
2119 
2122  template <class R>
2123  void StrokeEllipticPie( const R& r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2124  {
2125  StrokeEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span, pen );
2126  }
2127 
2130  void FillEllipticPie( double x0, double y0, double x1, double y1, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() );
2131 
2134  template <class R>
2135  void FillEllipticPie( const R& r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2136  {
2137  FillEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span, brush );
2138  }
2139 
2142  void EraseEllipticPie( double x0, double y0, double x1, double y1, double start, double span )
2143  {
2144  FillEllipticPie( x0, y0, x1, y1, start, span, BackgroundBrush() );
2145  }
2146 
2149  template <class R>
2150  void EraseEllipticPie( const R& r, double start, double span )
2151  {
2152  EraseEllipticPie( r.x0, r.y0, r.x1, r.y1, start, span );
2153  }
2154 
2157  void DrawPie( double xc, double yc, double r, double start, double span )
2158  {
2159  DrawEllipticPie( xc-r, yc-r, xc+r, yc+r, start, span );
2160  }
2161 
2164  template <class P>
2165  void DrawPie( const P& c, double r, double start, double span )
2166  {
2167  DrawPie( c.x, c.y, r, start, span );
2168  }
2169 
2172  void StrokePie( double xc, double yc, double r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2173  {
2174  StrokeEllipticPie( xc-r, yc-r, xc+r, yc+r, start, span, pen );
2175  }
2176 
2179  template <class P>
2180  void StrokePie( const P& c, double r, double start, double span, const pcl::Pen& pen = pcl::Pen::Null() )
2181  {
2182  StrokePie( c.x, c.y, r, start, span, pen );
2183  }
2184 
2187  void FillPie( double xc, double yc, double r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2188  {
2189  FillEllipticPie( xc-r, yc-r, xc+r, yc+r, start, span, brush );
2190  }
2191 
2194  template <class P>
2195  void FillPie( const P& c, double r, double start, double span, const pcl::Brush& brush = pcl::Brush::Null() )
2196  {
2197  FillPie( c.x, c.y, r, start, span, brush );
2198  }
2199 
2202  void ErasePie( double xc, double yc, double r, double start, double span )
2203  {
2204  FillPie( xc, yc, r, start, span, BackgroundBrush() );
2205  }
2206 
2209  template <class P>
2210  void ErasePie( const P& c, double r, double start, double span )
2211  {
2212  ErasePie( c.x, c.y, r, start, span );
2213  }
2214 
2217  void DrawBitmap( double x, double y, const Bitmap& );
2218 
2221  template <class P>
2222  void DrawBitmap( const P& p, const Bitmap& bm )
2223  {
2224  DrawBitmap( p.x, p.y, bm );
2225  }
2226 
2229  void DrawBitmapRect( double x, double y, const Bitmap&, double x0, double y0, double x1, double y1 );
2230 
2233  template <class P, class R>
2234  void DrawBitmapRect( const P& p, const Bitmap& bm, const R& r )
2235  {
2236  DrawBitmapRect( p.x, p.y, bm, r.x0, r.y0, r.x1, r.y1 );
2237  }
2238 
2241  void DrawScaledBitmap( double x0, double y0, double x1, double y1, const Bitmap& );
2242 
2245  template <class R>
2246  void DrawScaledBitmap( const R& r, const Bitmap& bm )
2247  {
2248  DrawScaledBitmap( r.x0, r.y0, r.x1, r.y1, bm );
2249  }
2250 
2253  void DrawScaledBitmapRect( double dx0, double dy0, double dx1, double dy1, const Bitmap&, double sx0, double sy0, double sx1, double sy1 );
2254 
2257  template <class R1, class R2>
2258  void DrawScaledBitmapRect( const R1& dst, const Bitmap& bm, const R2& src )
2259  {
2260  DrawScaledBitmapRect( dst.x0, dst.y0, dst.x1, dst.y1, bm, src.x0, src.y0, src.x1, src.y1 );
2261  }
2262 
2265  void DrawTiledBitmap( double x0, double y0, double x1, double y1, const Bitmap&, double xOffset = 0, double yOffset = 0 );
2266 
2269  template <class R, class P>
2270  void DrawTiledBitmap( const R& r, const Bitmap& bm, const P& offset = P() )
2271  {
2272  DrawTiledBitmap( r.x0, r.y0, r.x1, r.y1, bm, offset.x, offset.y );
2273  }
2274 
2277  void DrawText( double x, double y, const String& );
2278 
2281  template <class P>
2282  void DrawText( const P& p, const String& s )
2283  {
2284  DrawText( p.x, p.y, s );
2285  }
2286 
2289  void DrawTextRect( double x0, double y0, double x1, double y1, const String&, TextAlignmentFlags = TextAlign::Default );
2290 
2293  template <class R>
2294  void DrawTextRect( const R& r, const String& s, TextAlignmentFlags a = TextAlign::Default )
2295  {
2296  DrawTextRect( r.x0, r.y0, r.x1, r.y1, s, a );
2297  }
2298 
2301  pcl::DRect TextRect( double x0, double y0, double x1, double y1, const String&, TextAlignmentFlags = TextAlign::Default ) const;
2302 
2305  template <class R>
2306  pcl::DRect TextRect( const R& r, const String& s, TextAlignmentFlags a = TextAlign::Default )
2307  {
2308  return TextRect( r.x0, r.y0, r.x1, r.y1, s, a );
2309  }
2310 
2311 private:
2312 
2313  VectorGraphics( void* h ) : GraphicsContextBase( h )
2314  {
2315  }
2316 
2317  friend class InterfaceDispatcher;
2318 };
2319 
2320 // ----------------------------------------------------------------------------
2321 
2322 #endif // !__PCL_BUILDING_PIXINSIGHT_APPLICATION
2323 
2324 } // pcl
2325 
2326 #endif // __PCL_Graphics_h
2327 
2328 // ----------------------------------------------------------------------------
2329 // EOF pcl/Graphics.h - Released 2024-06-18T15:48:54Z
Client-side interface to a PixInsight Bitmap object.
Definition: Bitmap.h:204
Client-side interface to a PixInsight Brush object.
Definition: Brush.h:158
static Brush & Null()
Client-side interface to a PixInsight Control object.
Definition: Control.h:126
A type-safe collection of enumerated flags.
Definition: Flags.h:85
Client-side interface to a PixInsight Font object.
Definition: Font.h:207
Generic dynamic matrix of arbitrary dimensions.
Definition: Matrix.h:123
A generic point in the two-dimensional space.
Definition: Point.h:100
component x
Abscissa (horizontal, or X-axis coordinate).
Definition: Point.h:111
component y
Ordinate (vertical, or Y-axis coordinate).
Definition: Point.h:112
A generic rectangle in the two-dimensional space.
Definition: Rectangle.h:314
component x1
Horizontal coordinate of the lower right corner.
Definition: Rectangle.h:334
component y1
Vertical coordinate of the lower right corner.
Definition: Rectangle.h:335
component y0
Vertical coordinate of the upper left corner.
Definition: Rectangle.h:333
component x0
Horizontal coordinate of the upper left corner.
Definition: Rectangle.h:332
Base class of client-side interface classes to PixInsight graphics contexts
Definition: Graphics.h:208
void DisableTextAntialiasing(bool disable=true)
Definition: Graphics.h:484
bool IsTextAntialiasingEnabled() const
void ShearTransformation(double sx, double sy)
void EnableAntialiasing(bool=true)
DPoint Transformed(const DPoint &p) const
Definition: Graphics.h:418
void ShearTransformation(double s)
Definition: Graphics.h:392
void Transform(double &x, double &y) const
void SetPen(RGBA color, float width)
Definition: Graphics.h:575
bool IsOpaqueBackground() const
Definition: Graphics.h:541
void SetCompositionOperator(composition_op)
void SetOpaqueBackground(bool opaque=true)
Definition: Graphics.h:552
bool IsClippingEnabled() const
void SetBrush(const pcl::Brush &)
void Transform(DPoint *p, size_type n) const
bool BeginPaint(Control &control)
GraphicsContextBase(Control &control)
void ScaleTransformation(double scale)
Definition: Graphics.h:370
~GraphicsContextBase() override
Definition: Graphics.h:260
void EnableTextAntialiasing(bool=true)
void MultiplyTransformationMatrix(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
Definition: Graphics.h:353
Array< DPoint > Transformed(const Array< DPoint > &a) const
Definition: Graphics.h:437
void SetOpacity(double op)
FillRule::value_type fill_rule
Definition: Graphics.h:219
void Transform(Array< DPoint > &a) const
Definition: Graphics.h:411
void SetTransparentBackground(bool=true)
void SetFont(const pcl::Font &)
void DisableTransformation(bool disable=true)
Definition: Graphics.h:325
pcl::Pen Pen() const
bool IsSmoothInterpolationEnabled() const
void EnableSmoothInterpolation(bool=true)
void ScaleTransformation(double xScale, double yScale)
pcl::Font GetFont() const
Definition: Graphics.h:603
void SetTransformationMatrix(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
Definition: Graphics.h:340
void SetBackgroundBrush(const pcl::Brush &)
pcl::Pen GetPen() const
Definition: Graphics.h:564
GraphicsContextBase(GraphicsContextBase &&x)
Definition: Graphics.h:251
void MultiplyTransformationMatrix(const Matrix &M)
void EnableTransformation(bool=true)
void ResetCompositionOperator()
Definition: Graphics.h:514
bool IsTransparentBackground() const
void RotateTransformation(double angleRadians)
bool IsTransformationEnabled() const
void DisableAntialiasing(bool disable=true)
Definition: Graphics.h:469
void DisableClipping(bool disable=true)
Definition: Graphics.h:454
pcl::Font Font() const
void DisableSmoothInterpolation(bool disable=true)
Definition: Graphics.h:499
void SetTransformationMatrix(const Matrix &M)
bool BeginPaint(Bitmap &bitmap)
void TranslateTransformation(double d)
Definition: Graphics.h:381
pcl::Brush BackgroundBrush() const
composition_op CompositionOperator() const
GraphicsContextBase(Bitmap &bitmap)
double Opacity() const
DRect Transformed(const DRect &r) const
Definition: Graphics.h:427
pcl::Brush GetBrush() const
Definition: Graphics.h:587
bool IsAntialiasingEnabled() const
void EnableClipping(bool=true)
pcl::Brush Brush() const
void SetPen(const pcl::Pen &)
Matrix TransformationMatrix() const
void EnsureUnique() override
Definition: Graphics.h:283
void TranslateTransformation(double dx, double dy)
CompositionOp::value_type composition_op
Definition: Graphics.h:214
bool BeginPaint(SVG &svg)
Client-side interface to a PixInsight graphics context object.
Definition: Graphics.h:646
void DrawScaledBitmapRect(const pcl::Rect &dst, const Bitmap &bm, const pcl::Rect &src)
Definition: Graphics.h:1393
void EraseCircle(const pcl::Point &c, int r)
Definition: Graphics.h:1055
void SetClipRect(const pcl::Rect &r)
Definition: Graphics.h:733
void DrawText(const pcl::Point &p, const String &s)
Definition: Graphics.h:1415
void DrawBitmap(int x, int y, const Bitmap &)
void DrawBitmap(const pcl::Point &p, const Bitmap &bm)
Definition: Graphics.h:1360
void DrawScaledBitmap(const pcl::Rect &r, const Bitmap &bm)
Definition: Graphics.h:1382
void ErasePie(int xc, int yc, int r, double start, double span)
Definition: Graphics.h:1342
void EraseRoundedRect(const pcl::Rect &r, double rx, double ry)
Definition: Graphics.h:945
void FillRoundedRect(const pcl::Rect &r, double rxy=25, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:924
void DrawScaledBitmap(int x0, int y0, int x1, int y1, const Bitmap &)
void StrokeEllipticChord(int x0, int y0, int x1, int y1, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
void DrawTiledBitmap(int x0, int y0, int x1, int y1, const Bitmap &, int xOffset=0, int yOffset=0)
static Graphics & Null()
void StrokePie(int xc, int yc, int r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1314
void FillEllipticPie(int x0, int y0, int x1, int y1, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
void EraseRect(int x0, int y0, int x1, int y1)
Definition: Graphics.h:842
pcl::Rect ClipRect() const
pcl::Point BrushOrigin() const
void DrawChord(int xc, int yc, int r, double start, double span)
Definition: Graphics.h:1197
void DrawCircle(int xc, int yc, int r)
Definition: Graphics.h:1006
void DrawTextRect(int x0, int y0, int x1, int y1, const String &, TextAlignmentFlags=TextAlign::Default)
void DrawPolygon(const C &c, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1067
void StrokeRect(int x0, int y0, int x1, int y1, const pcl::Pen &pen=pcl::Pen::Null())
pcl::Rect TextRect(const pcl::Rect r, const String &s, TextAlignmentFlags a=TextAlign::Default)
Definition: Graphics.h:1437
void FillRect(const pcl::Rect &r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:835
void EraseRoundedRect(int x0, int y0, int x1, int y1, double rx, double ry)
Definition: Graphics.h:931
void StrokeRect(const pcl::Rect &r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:824
void StrokeRoundedRect(const pcl::Rect &r, double rxy=25, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:899
void DrawRoundedRect(int x0, int y0, int x1, int y1, double rx, double ry)
void ErasePolygon(const pcl::Point *p, size_type n, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1098
void IntersectClipRect(const pcl::Rect &r)
Definition: Graphics.h:744
void IntersectClipRect(int x0, int y0, int x1, int y1)
Definition: Graphics.h:751
void FillChord(int xc, int yc, int r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1225
void StrokeRoundedRect(const pcl::Rect &r, double rx, double ry, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:892
void FillChord(const pcl::Point &c, int r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1232
void StrokeEllipticPie(int x0, int y0, int x1, int y1, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
void EraseRoundedRect(const pcl::Rect &r, double rxy=25)
Definition: Graphics.h:952
void SetClipRect(int x0, int y0, int x1, int y1)
void DrawEllipse(const pcl::Rect &r)
Definition: Graphics.h:963
void DrawTextRect(const pcl::Rect r, const String &s, TextAlignmentFlags a=TextAlign::Default)
Definition: Graphics.h:1426
Graphics(SVG &svg)
Definition: Graphics.h:690
void DrawEllipticPie(int x0, int y0, int x1, int y1, double start, double span)
void StrokeEllipse(int x0, int y0, int x1, int y1, const pcl::Pen &pen=pcl::Pen::Null())
void DrawEllipticChord(int x0, int y0, int x1, int y1, double start, double span)
void FillRoundedRect(int x0, int y0, int x1, int y1, double rxy=25, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:910
void SetBrushOrigin(int x, int y)
void EraseEllipticPie(const pcl::Rect &r, double start, double span)
Definition: Graphics.h:1293
void EraseEllipse(int x0, int y0, int x1, int y1)
Definition: Graphics.h:992
void DrawTiledBitmap(const pcl::Rect &r, const Bitmap &bm, const pcl::Point &offset=pcl::Point(0))
Definition: Graphics.h:1404
Graphics(Bitmap &bitmap)
Definition: Graphics.h:681
void FillEllipse(int x0, int y0, int x1, int y1, const pcl::Brush &brush=pcl::Brush::Null())
void EraseCircle(int xc, int yc, int r)
Definition: Graphics.h:1048
void DrawPolygon(const pcl::Point *p, size_type n, fill_rule rule=FillRule::OddEven)
void FillPie(const pcl::Point &c, int r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1335
void EraseRoundedRect(int x0, int y0, int x1, int y1, double rxy=25)
Definition: Graphics.h:938
void FillPie(int xc, int yc, int r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1328
void StrokeChord(int xc, int yc, int r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1211
~Graphics() override
Definition: Graphics.h:707
void DrawArc(const pcl::Point &c, int r, double start, double span)
Definition: Graphics.h:1143
void FillPolygon(const pcl::Point *p, size_type n, const pcl::Brush &brush=pcl::Brush::Null(), fill_rule rule=FillRule::OddEven)
Graphics(Control &control)
Definition: Graphics.h:672
void FillEllipticPie(const pcl::Rect &r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1279
void DrawEllipticArc(const pcl::Rect &r, double start, double span)
Definition: Graphics.h:1129
void StrokeRoundedRect(int x0, int y0, int x1, int y1, double rx, double ry, const pcl::Pen &pen=pcl::Pen::Null())
void DrawChord(const pcl::Point &c, int r, double start, double span)
Definition: Graphics.h:1204
void DrawScaledBitmapRect(int dx0, int dy0, int dx1, int dy1, const Bitmap &, int sx0, int sy0, int sx1, int sy1)
void DrawPoint(const pcl::Point &p)
Definition: Graphics.h:787
void FillEllipticChord(int x0, int y0, int x1, int y1, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
void StrokeChord(const pcl::Point &c, int r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1218
void DrawRoundedRect(int x0, int y0, int x1, int y1, double rxy=25)
Definition: Graphics.h:860
void FillRoundedRect(const pcl::Rect &r, double rx, double ry, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:917
void StrokePolygon(const C &c, const pcl::Pen &pen=pcl::Pen::Null(), fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1079
void EraseEllipticPie(int x0, int y0, int x1, int y1, double start, double span)
Definition: Graphics.h:1286
void EraseChord(int xc, int yc, int r, double start, double span)
Definition: Graphics.h:1239
void FillRect(int x0, int y0, int x1, int y1, const pcl::Brush &brush=pcl::Brush::Null())
Graphics(Graphics &&x)
Definition: Graphics.h:698
void StrokeEllipticPie(const pcl::Rect &r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1268
void DrawPoint(int x, int y)
void DrawArc(int xc, int yc, int r, double start, double span)
Definition: Graphics.h:1136
void DrawRoundedRect(const pcl::Rect &r, double rx, double ry)
Definition: Graphics.h:867
void ErasePie(const pcl::Point &c, int r, double start, double span)
Definition: Graphics.h:1349
void DrawPie(int xc, int yc, int r, double start, double span)
Definition: Graphics.h:1300
void DrawRect(const pcl::Rect &r)
Definition: Graphics.h:813
void FillEllipticChord(const pcl::Rect &r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1176
void DrawPolyline(const C &c)
Definition: Graphics.h:1118
void StrokeCircle(const pcl::Point &c, int r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1027
void EraseRect(const pcl::Rect &r)
Definition: Graphics.h:849
void UniteClipRect(int x0, int y0, int x1, int y1)
Definition: Graphics.h:765
void DrawText(int x, int y, const String &)
void StrokeEllipticChord(const pcl::Rect &r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1165
void DrawLine(const pcl::Point &p0, const pcl::Point &p1)
Definition: Graphics.h:798
void SetBrushOrigin(const pcl::Point &p)
Definition: Graphics.h:776
void EraseEllipticChord(int x0, int y0, int x1, int y1, double start, double span)
Definition: Graphics.h:1183
void DrawEllipticPie(const pcl::Rect &r, double start, double span)
Definition: Graphics.h:1257
void EraseEllipse(const pcl::Rect &r)
Definition: Graphics.h:999
pcl::Rect TextRect(int x0, int y0, int x1, int y1, const String &, TextAlignmentFlags=TextAlign::Default) const
void FillCircle(const pcl::Point &c, int r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1041
void UniteClipRect(const pcl::Rect &r)
Definition: Graphics.h:758
void DrawPie(const pcl::Point &c, int r, double start, double span)
Definition: Graphics.h:1307
void DrawBitmapRect(int x, int y, const Bitmap &, int x0, int y0, int x1, int y1)
void ErasePolygon(const C &c, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1106
void DrawEllipticChord(const pcl::Rect &r, double start, double span)
Definition: Graphics.h:1154
void DrawRect(int x0, int y0, int x1, int y1)
void DrawEllipse(int x0, int y0, int x1, int y1)
void FillPolygon(const C &c, const pcl::Brush &brush=pcl::Brush::Null(), fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1091
void StrokeEllipse(const pcl::Rect &r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:974
void StrokePolygon(const pcl::Point *p, size_type n, const pcl::Pen &pen=pcl::Pen::Null(), fill_rule rule=FillRule::OddEven)
void StrokePie(const pcl::Point &c, int r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1321
void DrawLine(int x0, int y0, int x1, int y1)
Graphics()=default
void DrawBitmapRect(const pcl::Point &p, const Bitmap &bm, const pcl::Rect &r)
Definition: Graphics.h:1371
void EraseEllipticChord(const pcl::Rect &r, double start, double span)
Definition: Graphics.h:1190
void DrawCircle(const pcl::Point &c, int r)
Definition: Graphics.h:1013
void FillEllipse(const pcl::Rect &r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:985
void DrawPolyline(const pcl::Point *, size_type n)
void FillRoundedRect(int x0, int y0, int x1, int y1, double rx, double ry, const pcl::Brush &brush=pcl::Brush::Null())
void FillCircle(int xc, int yc, int r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1034
void EraseChord(const pcl::Point &c, int r, double start, double span)
Definition: Graphics.h:1246
void DrawRoundedRect(const pcl::Rect &r, double rxy=25)
Definition: Graphics.h:874
void StrokeCircle(int xc, int yc, int r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1020
void StrokeRoundedRect(int x0, int y0, int x1, int y1, double rxy=25, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:885
void DrawEllipticArc(int x0, int y0, int x1, int y1, double start, double span)
Client-side interface to a PixInsight Pen object.
Definition: Pen.h:163
static Pen & Null()
Scalable Vector Graphics generation.
Definition: SVG.h:81
Unicode (UTF-16) string.
Definition: String.h:8113
Root base class for all user interface objects.
Definition: UIObject.h:95
Client-side interface to a PixInsight vector graphics context.
Definition: Graphics.h:1463
void DrawRoundedRect(const R &r, double rx, double ry)
Definition: Graphics.h:1695
void DrawRoundedRect(double x0, double y0, double x1, double y1, double rxy=25)
Definition: Graphics.h:1687
void EraseEllipticPie(const R &r, double start, double span)
Definition: Graphics.h:2150
void DrawEllipticPie(const R &r, double start, double span)
Definition: Graphics.h:2111
void StrokePolygon(const C &c, const pcl::Pen &pen=pcl::Pen::Null(), fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1922
void DrawText(const P &p, const String &s)
Definition: Graphics.h:2282
VectorGraphics(VectorGraphics &&x)
Definition: Graphics.h:1515
VectorGraphics()=default
void FillCircle(double xc, double yc, double r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1875
void EraseRect(const R &r)
Definition: Graphics.h:1676
void DrawText(double x, double y, const String &)
void StrokeCircle(const P &c, double r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1868
void FillEllipticPie(double x0, double y0, double x1, double y1, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
void EraseRoundedRect(const R &r, double rx, double ry)
Definition: Graphics.h:1779
void StrokeRect(const R &r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1649
void DrawPolygon(const C &c, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1910
void StrokePie(double xc, double yc, double r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2172
void StrokeEllipse(const R &r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1811
void EraseEllipticChord(const R &r, double start, double span)
Definition: Graphics.h:2039
void StrokeEllipticPie(const R &r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2123
void FillPolygon(const pcl::DPoint *p, size_type n, const pcl::Brush &brush=pcl::Brush::Null(), fill_rule rule=FillRule::OddEven)
void DrawArc(double xc, double yc, double r, double start, double span)
Definition: Graphics.h:1980
void DrawBitmapRect(const P &p, const Bitmap &bm, const R &r)
Definition: Graphics.h:2234
pcl::DRect ClipRect() const
void EraseRoundedRect(const R &r, double rxy=25)
Definition: Graphics.h:1787
void DrawRect(const R &r)
Definition: Graphics.h:1637
void FillRoundedRect(const R &r, double rxy=25, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1757
void DrawRoundedRect(const R &r, double rxy=25)
Definition: Graphics.h:1703
void EraseChord(double xc, double yc, double r, double start, double span)
Definition: Graphics.h:2091
void DrawArc(const P &c, double r, double start, double span)
Definition: Graphics.h:1988
void DrawScaledBitmapRect(const R1 &dst, const Bitmap &bm, const R2 &src)
Definition: Graphics.h:2258
void DrawTiledBitmap(const R &r, const Bitmap &bm, const P &offset=P())
Definition: Graphics.h:2270
void SetClipRect(double x0, double y0, double x1, double y1)
void EraseRoundedRect(double x0, double y0, double x1, double y1, double rx, double ry)
Definition: Graphics.h:1764
void DrawPie(const P &c, double r, double start, double span)
Definition: Graphics.h:2165
void DrawLine(const P0 &p0, const P1 &p1)
Definition: Graphics.h:1621
void FillChord(const P &c, double r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2084
void StrokeRoundedRect(const R &r, double rxy=25, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1730
void IntersectClipRect(double x0, double y0, double x1, double y1)
Definition: Graphics.h:1570
void DrawTiledBitmap(double x0, double y0, double x1, double y1, const Bitmap &, double xOffset=0, double yOffset=0)
void FillEllipticPie(const R &r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2135
void DrawBitmap(double x, double y, const Bitmap &)
void ErasePie(const P &c, double r, double start, double span)
Definition: Graphics.h:2210
void DrawScaledBitmap(double x0, double y0, double x1, double y1, const Bitmap &)
void EraseCircle(double xc, double yc, double r)
Definition: Graphics.h:1890
void DrawLine(double x0, double y0, double x1, double y1)
void DrawPoint(double x, double y)
pcl::DPoint BrushOrigin() const
void EraseRect(double x0, double y0, double x1, double y1)
Definition: Graphics.h:1668
void EraseEllipticChord(double x0, double y0, double x1, double y1, double start, double span)
Definition: Graphics.h:2031
void DrawEllipse(double x0, double y0, double x1, double y1)
void SetClipRect(const R &r)
Definition: Graphics.h:1551
void FillChord(double xc, double yc, double r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2076
void DrawTextRect(const R &r, const String &s, TextAlignmentFlags a=TextAlign::Default)
Definition: Graphics.h:2294
void DrawPie(double xc, double yc, double r, double start, double span)
Definition: Graphics.h:2157
void StrokePie(const P &c, double r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2180
void DrawScaledBitmapRect(double dx0, double dy0, double dx1, double dy1, const Bitmap &, double sx0, double sy0, double sx1, double sy1)
void FillPie(const P &c, double r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2195
void FillPie(double xc, double yc, double r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2187
void StrokeRect(double x0, double y0, double x1, double y1, const pcl::Pen &pen=pcl::Pen::Null())
void DrawEllipticArc(double x0, double y0, double x1, double y1, double start, double span)
void DrawEllipticPie(double x0, double y0, double x1, double y1, double start, double span)
void StrokePolygon(const pcl::DPoint *p, size_type n, const pcl::Pen &pen=pcl::Pen::Null(), fill_rule rule=FillRule::OddEven)
void ErasePie(double xc, double yc, double r, double start, double span)
Definition: Graphics.h:2202
void StrokeCircle(double xc, double yc, double r, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1860
pcl::DRect TextRect(const R &r, const String &s, TextAlignmentFlags a=TextAlign::Default)
Definition: Graphics.h:2306
void SetBrushOrigin(double x, double y)
VectorGraphics(SVG &svg)
Definition: Graphics.h:1507
void SetBrushOrigin(const P &p)
Definition: Graphics.h:1597
void ErasePolygon(const pcl::DPoint *p, size_type n, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1941
void FillCircle(const P &c, double r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1883
void FillEllipse(double x0, double y0, double x1, double y1, const pcl::Brush &brush=pcl::Brush::Null())
void DrawCircle(double xc, double yc, double r)
Definition: Graphics.h:1845
void FillRect(const R &r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1661
void FillEllipse(const R &r, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1823
void StrokeEllipticPie(double x0, double y0, double x1, double y1, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
void FillEllipticChord(const R &r, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:2024
void DrawBitmap(const P &p, const Bitmap &bm)
Definition: Graphics.h:2222
~VectorGraphics() override
Definition: Graphics.h:1524
void DrawPolyline(const C &c)
Definition: Graphics.h:1961
VectorGraphics(Bitmap &bitmap)
Definition: Graphics.h:1498
void EraseRoundedRect(double x0, double y0, double x1, double y1, double rxy=25)
Definition: Graphics.h:1771
void StrokeChord(const P &c, double r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2069
void StrokeChord(double xc, double yc, double r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2061
void DrawScaledBitmap(const R &r, const Bitmap &bm)
Definition: Graphics.h:2246
void EraseEllipse(double x0, double y0, double x1, double y1)
Definition: Graphics.h:1830
void StrokeEllipse(double x0, double y0, double x1, double y1, const pcl::Pen &pen=pcl::Pen::Null())
void FillRect(double x0, double y0, double x1, double y1, const pcl::Brush &brush=pcl::Brush::Null())
static VectorGraphics & Null()
void DrawPoint(const P &p)
Definition: Graphics.h:1609
void DrawPolyline(const pcl::DPoint *, size_type n)
void ErasePolygon(const C &c, fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1949
void FillRoundedRect(double x0, double y0, double x1, double y1, double rx, double ry, const pcl::Brush &brush=pcl::Brush::Null())
void DrawChord(const P &c, double r, double start, double span)
Definition: Graphics.h:2054
void EraseEllipticPie(double x0, double y0, double x1, double y1, double start, double span)
Definition: Graphics.h:2142
void DrawRect(double x0, double y0, double x1, double y1)
void StrokeRoundedRect(const R &r, double rx, double ry, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1722
void UniteClipRect(double x0, double y0, double x1, double y1)
Definition: Graphics.h:1585
void StrokeEllipticChord(const R &r, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:2012
void DrawChord(double xc, double yc, double r, double start, double span)
Definition: Graphics.h:2046
void StrokeEllipticChord(double x0, double y0, double x1, double y1, double start, double span, const pcl::Pen &pen=pcl::Pen::Null())
void DrawPolygon(const pcl::DPoint *p, size_type n, fill_rule rule=FillRule::OddEven)
void DrawTextRect(double x0, double y0, double x1, double y1, const String &, TextAlignmentFlags=TextAlign::Default)
void StrokeRoundedRect(double x0, double y0, double x1, double y1, double rxy=25, const pcl::Pen &pen=pcl::Pen::Null())
Definition: Graphics.h:1714
void StrokeRoundedRect(double x0, double y0, double x1, double y1, double rx, double ry, const pcl::Pen &pen=pcl::Pen::Null())
VectorGraphics(Control &control)
Definition: Graphics.h:1489
void FillRoundedRect(double x0, double y0, double x1, double y1, double rxy=25, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1741
void UniteClipRect(const R &r)
Definition: Graphics.h:1578
void DrawEllipticChord(double x0, double y0, double x1, double y1, double start, double span)
pcl::DRect TextRect(double x0, double y0, double x1, double y1, const String &, TextAlignmentFlags=TextAlign::Default) const
void DrawEllipse(const R &r)
Definition: Graphics.h:1799
void DrawBitmapRect(double x, double y, const Bitmap &, double x0, double y0, double x1, double y1)
void FillRoundedRect(const R &r, double rx, double ry, const pcl::Brush &brush=pcl::Brush::Null())
Definition: Graphics.h:1749
void EraseEllipse(const R &r)
Definition: Graphics.h:1838
void IntersectClipRect(const R &r)
Definition: Graphics.h:1563
void DrawEllipticChord(const R &r, double start, double span)
Definition: Graphics.h:2000
void EraseChord(const P &c, double r, double start, double span)
Definition: Graphics.h:2099
void FillPolygon(const C &c, const pcl::Brush &brush=pcl::Brush::Null(), fill_rule rule=FillRule::OddEven)
Definition: Graphics.h:1934
void DrawEllipticArc(const R &r, double start, double span)
Definition: Graphics.h:1973
void DrawCircle(const P &c, double r)
Definition: Graphics.h:1853
void FillEllipticChord(double x0, double y0, double x1, double y1, double start, double span, const pcl::Brush &brush=pcl::Brush::Null())
void DrawRoundedRect(double x0, double y0, double x1, double y1, double rx, double ry)
void EraseCircle(const P &c, double r)
Definition: Graphics.h:1898
uint32 RGBA
Definition: Color.h:92
size_t size_type
Definition: Defs.h:609
PCL root namespace.
Definition: AbstractImage.h:77