CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
graphics.h
1
2#ifndef _aspose_drawing_graphics_h_
3#define _aspose_drawing_graphics_h_
4
5#include "fwd.h"
6#include "drawing/image.h"
7#include "drawing/brushes.h"
8#include "drawing/font.h"
9#include "drawing/size_f.h"
10#include "drawing/drawing2d/smoothing_mode.h"
11#include "drawing/drawing2d/graphics_path.h"
12#include "drawing/drawing2d/graphics_container.h"
13#include "drawing/drawing2d/graphics_state.h"
14#include "drawing/drawing2d/pixel_offset_mode.h"
15#include "drawing/drawing2d/interpolation_mode.h"
16#include "drawing/drawing2d/combine_mode.h"
17#include "drawing/drawing2d/compositing_mode.h"
18#include "drawing/drawing2d/matrix_order.h"
19#include "drawing/drawing2d/matrix.h"
20#include "drawing/drawing2d/coordinate_space.h"
21#include "drawing/drawing2d/flush_intention.h"
22#include "drawing/drawing2d/fill_mode.h"
23#include "drawing/pen.h"
24#include "drawing/copy_pixel_operation.h"
25#include "drawing/drawing2d/compositing_quality.h"
26#include "drawing/imaging/image_attributes.h"
27#include "drawing/text/text_rendering_hint.h"
28#include "drawing/imaging/emf_plus_record_type.h"
29#include "drawing/imaging/play_record_callback.h"
30
31#include "drawing/graphics_unit.h"
32#include "drawing/string_format.h"
33
34#ifdef ASPOSECPPLIB_BEING_BUILT
35#include <src/core/SkClipStack.h>
36#include <core/SkCanvas.h>
37#endif
38
39#include <memory>
40#include <functional>
41#include <stack>
42
44ASPOSECPP_3RD_PARTY_CLASS(SkCanvas);
46ASPOSECPP_3RD_PARTY_CLASS(SkClipStack);
48ASPOSECPP_3RD_PARTY_STRUCT(SkSize);
49
50namespace Aspose { namespace Testing { class GraphicsTest; } }
51namespace Aspose { namespace Testing { namespace ReleaseAsDebug { class Test; } } }
52namespace Aspose { namespace Images { namespace Pal { class GraphicsPal; } } }
53
54namespace System { namespace Drawing { namespace Imaging { class Metafile; } } }
55namespace System { namespace Drawing { namespace Drawing2D { class GraphicsContainer; } } }
56
57namespace System { namespace Drawing {
58
59class Region;
60class Bitmap;
61class Icon;
62class Font;
67class ASPOSECPP_SHARED_CLASS Graphics : virtual public Object
68{
70 RTTI_INFO(System::Drawing::Graphics, ::System::BaseTypesInfo<System::Object>);
71
72public:
73 friend class Region;
74 friend class Bitmap;
75 friend class Font;
77 using EnumerateMetafileProc = MulticastDelegate<bool(Imaging::EmfPlusRecordType, int32_t, int32_t, IntPtr, Imaging::PlayRecordCallback)>;
79 using DrawImageAbort = std::function<bool(IntPtr ptr)>;
80
84 static ASPOSECPP_SHARED_API SharedPtr<Graphics> FromImage(const SharedPtr<Image>& image);
85
90 ASPOSECPP_SHARED_API void set_CompositingMode(Drawing2D::CompositingMode mode);
91
96 ASPOSECPP_SHARED_API void set_CompositingQuality(Drawing2D::CompositingQuality quality);
97
103
108 ASPOSECPP_SHARED_API void set_PixelOffsetMode(Drawing2D::PixelOffsetMode mode);
109
114 ASPOSECPP_SHARED_API void set_SmoothingMode(Drawing2D::SmoothingMode mode);
115
120 ASPOSECPP_SHARED_API void set_TextRenderingHint(Text::TextRenderingHint hint);
121
124 ASPOSECPP_SHARED_API GraphicsUnit get_PageUnit() const;
128 ASPOSECPP_SHARED_API void set_PageUnit(GraphicsUnit value);
129
132 ASPOSECPP_SHARED_API RectangleF get_ClipBounds() const;
133
137 ASPOSECPP_SHARED_API void Clear(Color color);
138
147 ASPOSECPP_SHARED_API void DrawArc(const SharedPtr<Pen>& pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t startAngle, int32_t sweepAngle);
156 ASPOSECPP_SHARED_API void DrawArc(const SharedPtr<Pen>& pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
162 ASPOSECPP_SHARED_API void DrawArc(const SharedPtr<Pen>& pen, Rectangle rect, float startAngle, float sweepAngle);
168 ASPOSECPP_SHARED_API void DrawArc(const SharedPtr<Pen>& pen, RectangleF rect, float startAngle, float sweepAngle);
169
178 ASPOSECPP_SHARED_API void DrawPie(const SharedPtr<Pen>& pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t startAngle, int32_t sweepAngle);
187 ASPOSECPP_SHARED_API void DrawPie(const SharedPtr<Pen>& pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
193 ASPOSECPP_SHARED_API void DrawPie(const SharedPtr<Pen>& pen, Rectangle rect, float startAngle, float sweepAngle);
199 ASPOSECPP_SHARED_API void DrawPie(const SharedPtr<Pen>& pen, RectangleF rect, float startAngle, float sweepAngle);
200
209 ASPOSECPP_SHARED_API void FillPie(const SharedPtr<Brush>& brush, int x, int y, int width, int height, int startAngle, int sweepAngle);
218 ASPOSECPP_SHARED_API void FillPie(const SharedPtr<Brush>& brush, float x, float y, float width, float height, float startAngle, float sweepAngle);
224 ASPOSECPP_SHARED_API void FillPie(const SharedPtr<Brush>& brush, Rectangle rect, float startAngle, float sweepAngle);
225
232 ASPOSECPP_SHARED_API void DrawRectangle(const SharedPtr<Pen>& pen, int x, int y, int width, int height);
239 ASPOSECPP_SHARED_API void DrawRectangle(const SharedPtr<Pen>& pen, float x, float y, float width, float height);
243 ASPOSECPP_SHARED_API void DrawRectangle(const SharedPtr<Pen>& pen, Rectangle rect);
244
248 ASPOSECPP_SHARED_API void DrawRectangles(const SharedPtr<Pen>& pen, const ArrayPtr<Rectangle>& rects);
252 ASPOSECPP_SHARED_API void DrawRectangles(const SharedPtr<Pen>& pen, const ArrayPtr<RectangleF>& rects);
253
257 ASPOSECPP_SHARED_API void DrawPolygon(const SharedPtr<Pen>& pen, const ArrayPtr<Point>& points);
261 ASPOSECPP_SHARED_API void DrawPolygon(const SharedPtr<Pen>& pen, const ArrayPtr<PointF>& points);
262
269 ASPOSECPP_SHARED_API void FillRectangle(const SharedPtr<Brush>& brush, float x, float y, float width, float height);
276 ASPOSECPP_SHARED_API void FillRectangle(const SharedPtr<Brush>& brush, int x, int y, int width, int height);
280 ASPOSECPP_SHARED_API void FillRectangle(const SharedPtr<Brush>& brush, Rectangle rect);
284 ASPOSECPP_SHARED_API void FillRectangle(const SharedPtr<Brush>& brush, RectangleF rect);
285
289 ASPOSECPP_SHARED_API void FillRectangles(const SharedPtr<Brush>& brush, const ArrayPtr<Rectangle>& rects);
293 ASPOSECPP_SHARED_API void FillRectangles(const SharedPtr<Brush>& brush, const ArrayPtr<RectangleF>& rects);
294
298 ASPOSECPP_SHARED_API void DrawEllipse(const SharedPtr<Pen>& pen, Rectangle rect);
302 ASPOSECPP_SHARED_API void DrawEllipse(const SharedPtr<Pen>& pen, RectangleF rect);
309 ASPOSECPP_SHARED_API void DrawEllipse(const SharedPtr<Pen>& pen, int x, int y, int width, int height);
316 ASPOSECPP_SHARED_API void DrawEllipse(const SharedPtr<Pen>& pen, float x, float y, float width, float height);
317
324 ASPOSECPP_SHARED_API void DrawString(const String &str, const SharedPtr<Font>& font, const SharedPtr<Brush>& brush, PointF topLeft, const System::SharedPtr<System::Drawing::StringFormat>& stringFormat = nullptr);
331 ASPOSECPP_SHARED_API void DrawString(const String &str, const SharedPtr<Font>& font, const SharedPtr<Brush>& brush, RectangleF layoutRectangle, const System::SharedPtr<System::Drawing::StringFormat>& stringFormat = nullptr);
339 ASPOSECPP_SHARED_API void DrawString(const String &str, const SharedPtr<Font>& font, const SharedPtr<Brush>& brush, float x, float y, const System::SharedPtr<System::Drawing::StringFormat>& stringFormat = nullptr);
340
344 ASPOSECPP_SHARED_API void FillEllipse(const SharedPtr<Brush>& brush, Rectangle rect);
348 ASPOSECPP_SHARED_API void FillEllipse(const SharedPtr<Brush>& brush, RectangleF rect);
355 ASPOSECPP_SHARED_API void FillEllipse(const SharedPtr<Brush>& brush, int x, int y, int width, int height);
362 ASPOSECPP_SHARED_API void FillEllipse(const SharedPtr<Brush>& brush, float x, float y, float width, float height);
366 ASPOSECPP_SHARED_API void FillPath(const SharedPtr<Brush>& brush, const SharedPtr<Drawing2D::GraphicsPath>& path);
370 ASPOSECPP_SHARED_API void FillRegion(const SharedPtr<Brush>& brush, const SharedPtr<Region>& region);
375 ASPOSECPP_SHARED_API void FillPolygon(const SharedPtr<Brush>& brush, const ArrayPtr<Point>& points, Drawing2D::FillMode fillMode = Drawing2D::FillMode::Alternate);
380 ASPOSECPP_SHARED_API void FillPolygon(const SharedPtr<Brush>& brush, const ArrayPtr<PointF>& points, Drawing2D::FillMode fillMode = Drawing2D::FillMode::Alternate);
381
386 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const System::ArrayPtr<Point>& destPoints);
393 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const System::ArrayPtr<PointF>& destPoints,
394 const RectangleF& srcRect, GraphicsUnit srcUnit,
395 const Imaging::ImageAttributesPtr& imgAttributes);
402 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const System::Details::ArrayView<PointF>& destPoints,
403 const RectangleF& srcRect, GraphicsUnit srcUnit,
404 const Imaging::ImageAttributesPtr& imgAttributes);
411 template<std::size_t N>
412 void DrawImage(const SharedPtr<Image>& image, const System::Details::StackArray<PointF, N>& destPoints,
413 const RectangleF& srcRect, GraphicsUnit srcUnit,
414 const Imaging::ImageAttributesPtr& imgAttributes)
415 {
416 DrawImage(image, static_cast<System::Details::ArrayView<PointF>>(destPoints), srcRect, srcUnit, imgAttributes);
417 }
422 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, int x, int y);
427 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, float x, float y);
431 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Point pt);
435 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, PointF pt);
442 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, int x, int y, int width, int height);
449 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, float x, float y, float width, float height);
455 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit);
461 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit);
468 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit);
472 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const Rectangle & rect);
476 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const RectangleF & rect);
486 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes);
496 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes);
505 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit);
514 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit);
517 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes, Graphics::DrawImageAbort callback);
520 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes, Graphics::DrawImageAbort callback);
523 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes, Graphics::DrawImageAbort callback, IntPtr callbackData);
526 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr& imgAttributes, Graphics::DrawImageAbort callback, IntPtr callbackData);
529 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const ArrayPtr<PointF>& destPoints, RectangleF srcRect, GraphicsUnit srcUnit);
532 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const ArrayPtr<PointF>& destPoints);
535 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const ArrayPtr<Point>& destPoints, Rectangle srcRect, GraphicsUnit srcUnit);
542 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, const ArrayPtr<Point>& destPoints,
543 Rectangle srcRect, GraphicsUnit srcUnit,
544 const SharedPtr<Imaging::ImageAttributes>& imageAttr);
551 ASPOSECPP_SHARED_API void DrawImage(const SharedPtr<Image>& image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit);
552
557 ASPOSECPP_SHARED_API void DrawImageUnscaled(const SharedPtr<Image>& image, int x, int y);
564 ASPOSECPP_SHARED_API void DrawImageUnscaled(const SharedPtr<Image>& image, int x, int y, int width, int height);
569 ASPOSECPP_SHARED_API void DrawImageUnscaled(const SharedPtr<Image>& image, const Rectangle& rect);
573 ASPOSECPP_SHARED_API void DrawImageUnscaled(const SharedPtr<Image>& image, const Point& point);
574
579 ASPOSECPP_SHARED_API void DrawLine(const SharedPtr<Pen>& pen, Point pt1, Point pt2);
584 ASPOSECPP_SHARED_API void DrawLine(const SharedPtr<Pen>& pen, PointF pt1, PointF pt2);
591 ASPOSECPP_SHARED_API void DrawLine(const SharedPtr<Pen>& pen, int x1, int y1, int x2, int y2);
598 ASPOSECPP_SHARED_API void DrawLine(const SharedPtr<Pen>& pen, float x1, float y1, float x2, float y2);
599
602 ASPOSECPP_SHARED_API void DrawIcon(const SharedPtr<Icon>& icon, Rectangle targetRect);
605 ASPOSECPP_SHARED_API void DrawIcon(const SharedPtr<Icon>& icon, int32_t x, int32_t y);
608 ASPOSECPP_SHARED_API void DrawIconUnstretched(const SharedPtr<Icon>& icon, Rectangle targetRect);
611 ASPOSECPP_SHARED_API void DrawImageUnscaledAndClipped(const SharedPtr<Image>& image, Rectangle rectangle);
618 const SharedPtr<Font>& font,
619 RectangleF layoutRect,
620 const SharedPtr<StringFormat>& stringFormat);
627 ASPOSECPP_SHARED_API SizeF MeasureString(String const& str, System::SharedPtr<Font> const& font, PointF const& origin = PointF(0, 0), System::SharedPtr<StringFormat> const& stringFormat = nullptr) const;
634 ASPOSECPP_SHARED_API SizeF MeasureString(String const& str, System::SharedPtr<Font> const& font, int width, System::SharedPtr<StringFormat> const& stringFormat = nullptr) const;
637 ASPOSECPP_SHARED_API SizeF MeasureString(String const& str, System::SharedPtr<Font> const& font, SizeF const& layoutArea, System::SharedPtr<StringFormat> const& stringFormat, int& charactersFitted, int& linesFilled) const;
644 ASPOSECPP_SHARED_API SizeF MeasureString(String const& str, System::SharedPtr<Font> const& font, SizeF const& layoutArea, System::SharedPtr<StringFormat> const& stringFormat = nullptr) const;
645
648 ASPOSECPP_SHARED_API IntPtr GetHdc();
649
652 ASPOSECPP_SHARED_API void ReleaseHdc();
655 ASPOSECPP_SHARED_API void ReleaseHdc(IntPtr hdc);
658 static ASPOSECPP_SHARED_API SharedPtr<Graphics> FromHwnd(IntPtr hwnd);
661 static ASPOSECPP_SHARED_API SharedPtr<Graphics> FromHwndInternal(IntPtr hwnd);
662
664 ASPOSECPP_SHARED_API float get_PageScale() const;
667 ASPOSECPP_SHARED_API void set_PageScale(float scale);
668
670 ASPOSECPP_SHARED_API Point get_RenderingOrigin() const;
673 ASPOSECPP_SHARED_API void set_RenderingOrigin(Point point);
674
679 ASPOSECPP_SHARED_API void set_Transform(const SharedPtr<Drawing2D::Matrix>& matrix);
680
682 ASPOSECPP_SHARED_API float get_DpiX();
684 ASPOSECPP_SHARED_API float get_DpiY();
685
688 ASPOSECPP_SHARED_API SharedPtr<Region> get_Clip();
690 // Graphics object.
691 ASPOSECPP_SHARED_API void set_Clip(const SharedPtr<Region>& region);
692
698 ASPOSECPP_SHARED_API void SetClip(const SharedPtr<Region>& region, Drawing2D::CombineMode combineMode = Drawing2D::CombineMode::Replace);
704 ASPOSECPP_SHARED_API void SetClip(Rectangle rect, Drawing2D::CombineMode combineMode = Drawing2D::CombineMode::Replace);
710 ASPOSECPP_SHARED_API void SetClip(RectangleF rect, Drawing2D::CombineMode combineMode = Drawing2D::CombineMode::Replace);
713 ASPOSECPP_SHARED_API void SetClip(const SharedPtr<Graphics>& graphics,
720 ASPOSECPP_SHARED_API void SetClip(const SharedPtr<Drawing2D::GraphicsPath>& path,
722
725 ASPOSECPP_SHARED_API void ExcludeClip(Rectangle rect);
728 ASPOSECPP_SHARED_API void ExcludeClip(const SharedPtr<Region>& region);
730 ASPOSECPP_SHARED_API void ResetClip();
731
735 ASPOSECPP_SHARED_API void DrawPath(const SharedPtr<Pen>& pen, const SharedPtr<Drawing2D::GraphicsPath>& path);
739 ASPOSECPP_SHARED_API void DrawLines(const SharedPtr<Pen>& pen, const System::ArrayPtr<System::Drawing::Point>& points);
743 ASPOSECPP_SHARED_API void DrawLines(const SharedPtr<Pen>& pen, const System::ArrayPtr<System::Drawing::PointF>& points);
744
747 ASPOSECPP_SHARED_API void DrawBezier(const SharedPtr<Pen>& pen, const Point & pt1, const Point & pt2, const Point & pt3, const Point & pt4);
750 ASPOSECPP_SHARED_API void DrawBezier(const SharedPtr<Pen>& pen, const PointF& pt1, const PointF& pt2, const PointF& pt3, const PointF& pt4);
753 ASPOSECPP_SHARED_API void DrawBezier(const SharedPtr<Pen>& pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
757 ASPOSECPP_SHARED_API void DrawBeziers(const SharedPtr<Pen>& pen, const ArrayPtr<Point>& points);
761 ASPOSECPP_SHARED_API void DrawBeziers(const SharedPtr<Pen>& pen, const ArrayPtr<PointF>& points);
762
768 ASPOSECPP_SHARED_API void DrawClosedCurve(const SharedPtr<Pen>& pen, const ArrayPtr<Point>& points, float tension = 0.5f,
775 ASPOSECPP_SHARED_API void DrawClosedCurve(const SharedPtr<Pen>& pen, const ArrayPtr<PointF>& points, float tension = 0.5f,
777
782 ASPOSECPP_SHARED_API void DrawCurve(const SharedPtr<Pen>& pen, const ArrayPtr<Point>& points, float tension = 0.5f);
787 ASPOSECPP_SHARED_API void DrawCurve(const SharedPtr<Pen>& pen, const ArrayPtr<PointF>& points, float tension = 0.5f);
794 ASPOSECPP_SHARED_API void DrawCurve(const SharedPtr<Pen>& pen, const ArrayPtr<Point>& points, int32_t offset,
795 int32_t numberOfSegments, float tension = 0.5f);
802 ASPOSECPP_SHARED_API void DrawCurve(const SharedPtr<Pen>& pen, const ArrayPtr<PointF>& points, int32_t offset,
803 int32_t numberOfSegments, float tension = 0.5f);
804
810 ASPOSECPP_SHARED_API void FillClosedCurve(const SharedPtr<Brush>& brush, const ArrayPtr<PointF>& points,
811 Drawing2D::FillMode fillmode = Drawing2D::FillMode::Alternate, float tension = 0.5f);
817 ASPOSECPP_SHARED_API void FillClosedCurve(const SharedPtr<Brush>& brush, const ArrayPtr<Point>& points,
818 Drawing2D::FillMode fillmode = Drawing2D::FillMode::Alternate, float tension = 0.5f);
819
821 ASPOSECPP_SHARED_API void ResetTransform();
826 ASPOSECPP_SHARED_API void ScaleTransform(float sx, float sy, Drawing2D::MatrixOrder order = Drawing2D::MatrixOrder::Prepend);
830 ASPOSECPP_SHARED_API void RotateTransform(float angle, Drawing2D::MatrixOrder order = Drawing2D::MatrixOrder::Prepend);
835 ASPOSECPP_SHARED_API void TranslateTransform(float dx, float dy, Drawing2D::MatrixOrder order= Drawing2D::MatrixOrder::Prepend);
840
843 ASPOSECPP_SHARED_API void TranslateClip(int dx, int dy);
846 ASPOSECPP_SHARED_API void TranslateClip(float dx, float dy);
847
850 ASPOSECPP_SHARED_API void TransformPoints(Drawing2D::CoordinateSpace destSpace, Drawing2D::CoordinateSpace srcSpace,
854 ASPOSECPP_SHARED_API void TransformPoints(Drawing2D::CoordinateSpace destSpace, Drawing2D::CoordinateSpace srcSpace,
856
861 ASPOSECPP_SHARED_API void Restore(const SharedPtr<Drawing2D::GraphicsState>& graphicsState);
865
868 ASPOSECPP_SHARED_API void IntersectClip(const System::SharedPtr<Region>& region);
871 ASPOSECPP_SHARED_API void IntersectClip(System::Drawing::RectangleF rect);
874 ASPOSECPP_SHARED_API void IntersectClip(System::Drawing::Rectangle rect);
875
881 ASPOSECPP_SHARED_API bool IsVisible(Point point);
884 ASPOSECPP_SHARED_API bool IsVisible(PointF point);
887 ASPOSECPP_SHARED_API bool IsVisible(Rectangle rect);
890 ASPOSECPP_SHARED_API bool IsVisible(RectangleF rect);
893 ASPOSECPP_SHARED_API bool IsVisible(int32_t x, int32_t y);
896 ASPOSECPP_SHARED_API bool IsVisible(float x, float y);
899 ASPOSECPP_SHARED_API bool IsVisible(float x, float y, float width, float height);
902 ASPOSECPP_SHARED_API bool IsVisible(int32_t x, int32_t y, int32_t width, int32_t height);
903
918 ASPOSECPP_SHARED_API void EndContainer(const SharedPtr<Drawing2D::GraphicsContainer>& container);
919
922 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, const ArrayPtr<PointF>& destPoints, Graphics::EnumerateMetafileProc callback);
925 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, const ArrayPtr<Point>& destPoints, Graphics::EnumerateMetafileProc callback);
928 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, Point destPoint, Graphics::EnumerateMetafileProc callback);
931 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, PointF destPoint, Graphics::EnumerateMetafileProc callback);
934 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, Rectangle destRect, Graphics::EnumerateMetafileProc callback);
937 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, RectangleF destRect, Graphics::EnumerateMetafileProc callback);
940 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
943 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
946 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, const ArrayPtr<Point>& destPoints, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
949 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, const ArrayPtr<PointF>& destPoints, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
952 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
955 ASPOSECPP_SHARED_API void EnumerateMetafile(const SharedPtr<Imaging::Metafile>& metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback);
956
959 ASPOSECPP_SHARED_API void AddMetafileComment(const System::ArrayPtr<uint8_t>& data);
962 ASPOSECPP_SHARED_API void CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation = CopyPixelOperation::SourceCopy);
965 ASPOSECPP_SHARED_API void CopyFromScreen(int32_t sourceX, int32_t sourceY, int32_t destinationX, int32_t destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation = CopyPixelOperation::SourceCopy);
968 ASPOSECPP_SHARED_API int32_t get_TextContrast() const;
971 ASPOSECPP_SHARED_API void set_TextContrast(int32_t value);
974 ASPOSECPP_SHARED_API bool get_IsClipEmpty() const;
977 ASPOSECPP_SHARED_API bool get_IsVisibleClipEmpty() const;
978
981 ASPOSECPP_SHARED_API RectangleF get_VisibleClipBounds() const;
982
985 ASPOSECPP_SHARED_API Color GetNearestColor(Color color);
986
988 void Dispose() { };
989
990 ASPOSECPP_SHARED_API ~Graphics();
991
992 ASPOSECPP_SHARED_API SkCanvas* GetSkCanvas() const;
993
994private:
996 std::unique_ptr<SkCanvas> m_sk_canvas;
997 std::unique_ptr<SkClipStack> m_sk_clip_stack;
998
999 friend class Aspose::Testing::GraphicsTest;
1000 friend class Aspose::Testing::ReleaseAsDebug::Test;
1001 friend class Aspose::Images::Pal::GraphicsPal;
1007 ASPOSECPP_SHARED_API Graphics(std::unique_ptr<SkCanvas> canvas, float hRes = 96.0f, float vRes = 96.0f);
1008 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
1009 Graphics,
1010 CODEPORTING_ARGS(std::unique_ptr<SkCanvas> canvas, float hRes = 96.0f, float vRes = 96.0f)
1011 );
1012
1013 void SaveState(int id);
1014 void RestoreState(int id);
1015 void ResetState(const SharedPtr<Drawing2D::Matrix>& matrix);
1016
1017 struct State
1018 {
1019 State();
1020
1022 Drawing2D::InterpolationMode m_interpolation_mode;
1024 Drawing2D::CompositingQuality m_compositing_quality;
1026 Drawing2D::CompositingMode m_compositing_mode;
1028 Drawing2D::SmoothingMode m_smoothing_mode;
1030 Text::TextRenderingHint m_text_rendering_hint;
1032 GraphicsUnit m_page_unit;
1034 float m_page_scale;
1036 Point m_rendering_origin;
1038 int32_t m_text_contrast;
1039
1041 Drawing2D::PixelOffsetMode m_pixel_offset_mode;
1043 SharedPtr<Drawing2D::Matrix> m_transform_matrix;
1044 SharedPtr<Drawing2D::Matrix> m_base_transform_matrix;
1045 } m_current_state;
1046
1048 const float m_horizontal_resolution; //only default 96dpi is supported
1050 const float m_vertical_resolution; //only default 96dpi is supported
1051
1052 std::stack<std::pair<int, State>> m_states;
1053
1058 SkRect ToSkRect(const Drawing::RectangleF& rect, GraphicsUnit unit);
1059
1061 SharedPtr<Drawing2D::Matrix> CalculateWorldMatrix(bool apply_shift = false, bool calc_scale = true) const;
1062 SharedPtr<Drawing2D::Matrix> CalculateBaseMatrix() const;
1063 PointF CalculateWorldScale() const;
1064
1070 static float ConvertToPixelSize(float size, float dpi, GraphicsUnit unit);
1071
1079 static SizeF CorrectSize(const SizeF& size, const PointF& scale, const SizeF& layout, float font_size,
1080 const System::SharedPtr<StringFormat>& format);
1081
1082private:
1083 void DrawArcImpl(const SharedPtr<Pen>& pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
1084 void DrawPieImpl(const SharedPtr<Pen>& pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
1085 void FillPieImpl(const SharedPtr<Brush>& brush, float x, float y, float width, float height, float startAngle, float sweepAngle);
1086 void DrawEllipseImpl(const SharedPtr<Pen>& pen, float x, float y, float width, float height);
1087};
1088
1089}}
1090
1091
1092#endif // _aspose_drawing_graphics_h_
Represents a GDI+ bitmap image. Objects of this class should only be allocated using System::MakeObje...
Definition: bitmap.h:64
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:24
Represents a particular format for text, including font face, size, and style. Objects of this class ...
Definition: font.h:33
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
void FillEllipse(const SharedPtr< Brush > &brush, int x, int y, int width, int height)
Fills the interior of the ellipse specified by the bounding rectangle using the specified brush.
RectangleF get_VisibleClipBounds() const
Returns the RectangleF object that represents a bounding rectangle of the visible clipping region of ...
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, const ArrayPtr< Point > &destPoints, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void set_CompositingQuality(Drawing2D::CompositingQuality quality)
Sets a value that specifies the quality level to use when compositing images.
void DrawRectangles(const SharedPtr< Pen > &pen, const ArrayPtr< RectangleF > &rects)
Draws a series of rectangles using the specified pen.
void DrawImage(const SharedPtr< Image > &image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit)
Draws the specified region of the specified image at the specified location.
bool IsVisible(Point point)
Determines whether the specified point is contained within the visible clip region of the current Gra...
void DrawImage(const SharedPtr< Image > &image, const ArrayPtr< PointF > &destPoints, RectangleF srcRect, GraphicsUnit srcUnit)
NOT IMPLEMENTED.
void DrawBeziers(const SharedPtr< Pen > &pen, const ArrayPtr< Point > &points)
Draws a series of Bezier splines using the specified pen.
void DrawEllipse(const SharedPtr< Pen > &pen, Rectangle rect)
Draws the specified ellipse using the specified pen on the surface represented by the current object.
bool IsVisible(float x, float y)
NOT IMPLEMENTED.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, const ArrayPtr< PointF > &destPoints, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void FillRegion(const SharedPtr< Brush > &brush, const SharedPtr< Region > &region)
Fills the interiors of the specified region using the specified brush.
void DrawImageUnscaledAndClipped(const SharedPtr< Image > &image, Rectangle rectangle)
NOT IMPLEMENTED.
void DrawBezier(const SharedPtr< Pen > &pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
NOT IMPLEMENTED.
MulticastDelegate< bool(Imaging::EmfPlusRecordType, int32_t, int32_t, IntPtr, Imaging::PlayRecordCallback)> EnumerateMetafileProc
The type of a callback fuction object used as an argument for EnumerateMetafile method.
Definition: graphics.h:77
void DrawString(const String &str, const SharedPtr< Font > &font, const SharedPtr< Brush > &brush, RectangleF layoutRectangle, const System::SharedPtr< System::Drawing::StringFormat > &stringFormat=nullptr)
Draws the specified string in the specified rectangle using the specified font and brush.
IntPtr GetHdc()
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit)
Draws the specified region of the specified image to the specified rectangle.
void DrawLine(const SharedPtr< Pen > &pen, int x1, int y1, int x2, int y2)
Draws the specified line using the specified pen.
void Dispose()
Releases all operating system resources acquired by the current object.
Definition: graphics.h:988
GraphicsUnit get_PageUnit() const
Returns measurement units used for page coordinates on the surface represented by the current object.
void FillEllipse(const SharedPtr< Brush > &brush, float x, float y, float width, float height)
Fills the interior of the ellipse specified by the bounding rectangle using the specified brush.
SizeF MeasureString(String const &str, System::SharedPtr< Font > const &font, SizeF const &layoutArea, System::SharedPtr< StringFormat > const &stringFormat=nullptr) const
Returns a size of the specified string when drawn in the specified font in the specified format.
void EndContainer(const SharedPtr< Drawing2D::GraphicsContainer > &container)
Closes the current container and restores the state of this object from the state of saved container.
void DrawArc(const SharedPtr< Pen > &pen, RectangleF rect, float startAngle, float sweepAngle)
Draws the specified arc using the specified pen on the surface represented by the current object.
void FillPath(const SharedPtr< Brush > &brush, const SharedPtr< Drawing2D::GraphicsPath > &path)
Fills the interiors of the specified path using the specified brush.
void DrawArc(const SharedPtr< Pen > &pen, Rectangle rect, float startAngle, float sweepAngle)
Draws the specified arc using the specified pen on the surface represented by the current object.
void DrawString(const String &str, const SharedPtr< Font > &font, const SharedPtr< Brush > &brush, PointF topLeft, const System::SharedPtr< System::Drawing::StringFormat > &stringFormat=nullptr)
Draws the specified string at the specified location using the specified font and brush.
void set_TextContrast(int32_t value)
NOT IMPLEMENTED.
void DrawImageUnscaled(const SharedPtr< Image > &image, int x, int y, int width, int height)
Draws a specified image using its original physical size at a specified location.
void FillPie(const SharedPtr< Brush > &brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Fills the specified pie using the specified brush on the surface represented by the current object.
SharedPtr< Drawing2D::GraphicsState > Save()
Saves the current state of this object and returns the saved state.
void DrawBeziers(const SharedPtr< Pen > &pen, const ArrayPtr< PointF > &points)
Draws a series of Bezier splines using the specified pen.
void set_Clip(const SharedPtr< Region > &region)
Sets a region that limits the drawing area of the drawing surface represented by the current.
Drawing2D::SmoothingMode get_SmoothingMode()
Returns a value that indicates a soothing mode used during rendering on the surface represented by th...
int32_t get_TextContrast() const
NOT IMPLEMENTED.
void set_Transform(const SharedPtr< Drawing2D::Matrix > &matrix)
Sets the geometric world transformation for the current Graphics object.
void set_PageScale(float scale)
Sets the scaling between world units and page units for the current Graphics object.
void FillRectangle(const SharedPtr< Brush > &brush, float x, float y, float width, float height)
Fills the specified rectangle with the specified brush.
Drawing2D::CompositingMode get_CompositingMode()
Returns a value that indicates how composited images are drawn on the surface represented by the curr...
void DrawRectangle(const SharedPtr< Pen > &pen, float x, float y, float width, float height)
Draws the specified rectangle using the specified pen on the surface represented by the current objec...
void FillRectangles(const SharedPtr< Brush > &brush, const ArrayPtr< Rectangle > &rects)
Fills a series of rectangles using the specified brush.
void DrawPolygon(const SharedPtr< Pen > &pen, const ArrayPtr< PointF > &points)
Draws a polygon using the specified pen.
void DrawClosedCurve(const SharedPtr< Pen > &pen, const ArrayPtr< Point > &points, float tension=0.5f, Drawing2D::FillMode fillmode=Drawing2D::FillMode::Alternate)
Draws a closed spline using the specified pen.
void FillPie(const SharedPtr< Brush > &brush, Rectangle rect, float startAngle, float sweepAngle)
Fills the specified pie using the specified brush on the surface represented by the current object.
void DrawImage(const SharedPtr< Image > &image, float x, float y, float width, float height)
Draws the specified image to the specified rectangle.
void DrawEllipse(const SharedPtr< Pen > &pen, RectangleF rect)
Draws the specified ellipse using the specified pen on the surface represented by the current object.
void IntersectClip(System::Drawing::RectangleF rect)
Updates the clip region of this object to the intersection of the current clip and the specified clip...
void FillPolygon(const SharedPtr< Brush > &brush, const ArrayPtr< PointF > &points, Drawing2D::FillMode fillMode=Drawing2D::FillMode::Alternate)
Fills the interiors of the specified polygon using the specified brush.
SharedPtr< Drawing2D::GraphicsContainer > BeginContainer(Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit)
Saves a container with the current state of this object, opens and uses a new container and returns t...
SkCanvas * GetSkCanvas() const
void FillRectangle(const SharedPtr< Brush > &brush, int x, int y, int width, int height)
Fills the specified rectangle with the specified brush.
void SetClip(Rectangle rect, Drawing2D::CombineMode combineMode=Drawing2D::CombineMode::Replace)
Sets the clipping region of drawing surface represented by the current Graphics object to the result ...
void DrawImage(const SharedPtr< Image > &image, int x, int y, int width, int height)
Draws the specified image to the specified rectangle.
void Flush(Drawing2D::FlushIntention intention=Drawing2D::FlushIntention::Flush)
Triggers the immediate execution of all pending draw operations.
void ReleaseHdc()
NOT IMPLEMENTED.
void DrawPolygon(const SharedPtr< Pen > &pen, const ArrayPtr< Point > &points)
Draws a polygon using the specified pen.
void set_CompositingMode(Drawing2D::CompositingMode mode)
Sets a value that specifies how composited images are drawn on the surface represented by the current...
void FillPie(const SharedPtr< Brush > &brush, int x, int y, int width, int height, int startAngle, int sweepAngle)
Fills the specified pie using the specified brush on the surface represented by the current object.
void set_PixelOffsetMode(Drawing2D::PixelOffsetMode mode)
Sets a value that specifies how the pixels should be offset during rendering on the surface represent...
SharedPtr< Region > get_Clip()
Returns a Region object that represents a region that limits the drawing area of the drawing surface ...
void set_SmoothingMode(Drawing2D::SmoothingMode mode)
Sets a value that specifies a soothing mode used during rendering on the surface represented by the c...
SharedPtr< Drawing2D::Matrix > get_Transform()
Returns the geometric world transformation for the current Graphics object.
void IntersectClip(System::Drawing::Rectangle rect)
Updates the clip region of this object to the intersection of the current clip and the specified clip...
void DrawImage(const SharedPtr< Image > &image, const System::ArrayPtr< Point > &destPoints)
NOT IMPLEMENTED.
void TranslateClip(int dx, int dy)
NOT IMPLEMENTED.
void TranslateTransform(float dx, float dy, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Applies the specified translation vector to the world transformation matrix of the current Graphics o...
static SharedPtr< Graphics > FromHwnd(IntPtr hwnd)
NOT IMPLEMENTED.
bool IsVisible(PointF point)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, float x, float y)
Draws the specified image at the specified location.
Color GetNearestColor(Color color)
NOT IMPLEMENTED.
void FillRectangle(const SharedPtr< Brush > &brush, Rectangle rect)
Fills the specified rectangle with the specified brush.
bool IsVisible(int32_t x, int32_t y, int32_t width, int32_t height)
NOT IMPLEMENTED.
void MultiplyTransform(const SharedPtr< Drawing2D::Matrix > &matrix, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Multiplies the world transformation matrix of the current Graphics object by the specified matrix.
void set_RenderingOrigin(Point point)
Sets a Point object that specifies the rendering origin of the current Graphics object for dithering ...
void DrawPie(const SharedPtr< Pen > &pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Draws the specified pie using the specified pen on the surface represented by the current object.
void DrawArc(const SharedPtr< Pen > &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t startAngle, int32_t sweepAngle)
Draws the specified arc using the specified pen on the surface represented by the current object.
void FillRectangle(const SharedPtr< Brush > &brush, RectangleF rect)
Fills the specified rectangle with the specified brush.
void DrawCurve(const SharedPtr< Pen > &pen, const ArrayPtr< PointF > &points, int32_t offset, int32_t numberOfSegments, float tension=0.5f)
Draws a spline using the specified pen.
void DrawLines(const SharedPtr< Pen > &pen, const System::ArrayPtr< System::Drawing::Point > &points)
Draws a series of line segments using the specified pen.
bool IsVisible(int32_t x, int32_t y)
NOT IMPLEMENTED.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, const ArrayPtr< Point > &destPoints, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit)
Draws the specified region of the specified image at the specified location.
void set_PageUnit(GraphicsUnit value)
Sets measurement units used for page coordinates on the surface represented by the current object.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes, Graphics::DrawImageAbort callback, IntPtr callbackData)
NOT IMPLEMENTED.
void FillClosedCurve(const SharedPtr< Brush > &brush, const ArrayPtr< PointF > &points, Drawing2D::FillMode fillmode=Drawing2D::FillMode::Alternate, float tension=0.5f)
Draws a closed spline using the specified brush.
void DrawLine(const SharedPtr< Pen > &pen, PointF pt1, PointF pt2)
Draws the specified line using the specified pen.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes, Graphics::DrawImageAbort callback)
NOT IMPLEMENTED.
void ExcludeClip(const SharedPtr< Region > &region)
NOT IMPLEMENTED.
void DrawIcon(const SharedPtr< Icon > &icon, int32_t x, int32_t y)
NOT IMPLEMENTED.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, Rectangle destRect, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void DrawEllipse(const SharedPtr< Pen > &pen, float x, float y, float width, float height)
Draws the specified ellipse using the specified pen on the surface represented by the current object.
void Restore(const SharedPtr< Drawing2D::GraphicsState > &graphicsState)
Restores the state of this object from the saved state.
void DrawString(const String &str, const SharedPtr< Font > &font, const SharedPtr< Brush > &brush, float x, float y, const System::SharedPtr< System::Drawing::StringFormat > &stringFormat=nullptr)
Draws the specified string at the specified location using the specified font and brush.
SizeF MeasureString(String const &str, System::SharedPtr< Font > const &font, PointF const &origin=PointF(0, 0), System::SharedPtr< StringFormat > const &stringFormat=nullptr) const
Returns a size of the specified string when drawn in the specified font in the specified format.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, Point destPoint, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void DrawEllipse(const SharedPtr< Pen > &pen, int x, int y, int width, int height)
Draws the specified ellipse using the specified pen on the surface represented by the current object.
void DrawImage(const SharedPtr< Image > &image, Point pt)
Draws the specified image at the specified location.
void DrawImage(const SharedPtr< Image > &image, const ArrayPtr< Point > &destPoints, Rectangle srcRect, GraphicsUnit srcUnit)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes)
Draws the specified region of the specified image to the specified rectangle.
SizeF MeasureString(String const &str, System::SharedPtr< Font > const &font, int width, System::SharedPtr< StringFormat > const &stringFormat=nullptr) const
Returns a size of the specified string when drawn in the specified font in the specified format.
void DrawImage(const SharedPtr< Image > &image, const System::ArrayPtr< PointF > &destPoints, const RectangleF &srcRect, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes)
Draws the specified region of the specified image at the specified location.
void DrawImageUnscaled(const SharedPtr< Image > &image, const Rectangle &rect)
Draws a specified image using its original physical size at a specified location.
void TranslateClip(float dx, float dy)
NOT IMPLEMENTED.
ArrayPtr< SharedPtr< Region > > MeasureCharacterRanges(const System::String &text, const SharedPtr< Font > &font, RectangleF layoutRect, const SharedPtr< StringFormat > &stringFormat)
Returns an array of regions each of which bounds character positions in the specified string.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, PointF destPoint, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, const System::Details::ArrayView< PointF > &destPoints, const RectangleF &srcRect, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes)
Draws the specified region of the specified image at the specified location.
void DrawImageUnscaled(const SharedPtr< Image > &image, const Point &point)
Draws a specified image using its original physical size at a specified location.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes, Graphics::DrawImageAbort callback, IntPtr callbackData)
NOT IMPLEMENTED.
void IntersectClip(const System::SharedPtr< Region > &region)
Updates the clip region of this object to the intersection of the current clip and the specified clip...
SharedPtr< Drawing2D::GraphicsContainer > BeginContainer(RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit)
Saves a container with the current state of this object, opens and uses a new container and returns t...
Drawing2D::PixelOffsetMode get_PixelOffsetMode()
Returns a value that indicates how the pixels are offset during rendering on the surface represented ...
void DrawImage(const SharedPtr< Image > &image, const ArrayPtr< Point > &destPoints, Rectangle srcRect, GraphicsUnit srcUnit, const SharedPtr< Imaging::ImageAttributes > &imageAttr)
Draws the specified region of the specified image at the specified location.
void DrawLines(const SharedPtr< Pen > &pen, const System::ArrayPtr< System::Drawing::PointF > &points)
Draws a series of line segments using the specified pen.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, const ArrayPtr< PointF > &destPoints, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void DrawPath(const SharedPtr< Pen > &pen, const SharedPtr< Drawing2D::GraphicsPath > &path)
Draws the specified path using the specified pen.
Text::TextRenderingHint get_TextRenderingHint()
Returns a value that indicates the quality of text rendering.
bool get_IsVisibleClipEmpty() const
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, const RectangleF &rect)
Draws the specified image at the specified location.
float get_DpiY()
Returns the vertical resolution.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes)
Draws the specified region of the specified image to the specified rectangle.
void CopyFromScreen(int32_t sourceX, int32_t sourceY, int32_t destinationX, int32_t destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation=CopyPixelOperation::SourceCopy)
NOT IMPLEMENTED.
void TransformPoints(Drawing2D::CoordinateSpace destSpace, Drawing2D::CoordinateSpace srcSpace, const ArrayPtr< System::Drawing::Point > &pts)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)
Draws the specified region of the specified image at the specified location.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes, Graphics::DrawImageAbort callback)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, PointF pt)
Draws the specified image at the specified location.
static SharedPtr< Graphics > FromImage(const SharedPtr< Image > &image)
Creates a new Graphics object from the specified image.
bool get_IsClipEmpty() const
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, const Rectangle &rect)
Draws the specified image at the specified location.
void DrawIconUnstretched(const SharedPtr< Icon > &icon, Rectangle targetRect)
NOT IMPLEMENTED.
void DrawRectangle(const SharedPtr< Pen > &pen, Rectangle rect)
Draws the specified rectangle using the specified pen on the surface represented by the current objec...
void ReleaseHdc(IntPtr hdc)
NOT IMPLEMENTED.
void SetClip(const SharedPtr< Graphics > &graphics, Drawing2D::CombineMode combineMode=Drawing2D::CombineMode::Replace)
NOT IMPLEMENTED.
static SharedPtr< Graphics > FromHwndInternal(IntPtr hwnd)
NOT IMPLEMENTED.
void DrawRectangle(const SharedPtr< Pen > &pen, int x, int y, int width, int height)
Draws the specified rectangle using the specified pen on the surface represented by the current objec...
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
void AddMetafileComment(const System::ArrayPtr< uint8_t > &data)
NOT IMPLEMENTED.
float get_DpiX()
Returns the horizontal resolution.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, RectangleF destRect, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
bool IsVisible(RectangleF rect)
NOT IMPLEMENTED.
void DrawCurve(const SharedPtr< Pen > &pen, const ArrayPtr< Point > &points, float tension=0.5f)
Draws a spline using the specified pen.
void FillEllipse(const SharedPtr< Brush > &brush, RectangleF rect)
Fills the interior of the ellipse specified by the bounding rectangle using the specified brush.
void DrawCurve(const SharedPtr< Pen > &pen, const ArrayPtr< PointF > &points, float tension=0.5f)
Draws a spline using the specified pen.
bool IsVisible(Rectangle rect)
NOT IMPLEMENTED.
SharedPtr< Drawing2D::GraphicsContainer > BeginContainer()
Saves a container with the current state of this object, opens and uses a new container and returns t...
void DrawLine(const SharedPtr< Pen > &pen, float x1, float y1, float x2, float y2)
Draws the specified line using the specified pen.
Point get_RenderingOrigin() const
Returns a Point object that represents the rendering origin of the current Graphics object for dither...
void TransformPoints(Drawing2D::CoordinateSpace destSpace, Drawing2D::CoordinateSpace srcSpace, const ArrayPtr< System::Drawing::PointF > &pts)
NOT IMPLEMENTED.
void ResetClip()
Resets the clip region for this graphics to an infinite region.
RectangleF get_ClipBounds() const
Returns a rectangle that bounds the clipping area of the surface represented by the current object.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit)
Draws the specified region of the specified image to the specified rectangle.
void FillPolygon(const SharedPtr< Brush > &brush, const ArrayPtr< Point > &points, Drawing2D::FillMode fillMode=Drawing2D::FillMode::Alternate)
Fills the interiors of the specified polygon using the specified brush.
void DrawPie(const SharedPtr< Pen > &pen, Rectangle rect, float startAngle, float sweepAngle)
Draws the specified pie using the specified pen on the surface represented by the current object.
Drawing2D::InterpolationMode get_InterpolationMode()
Returns a value that indicates the interpolation mode associated with the current object.
void DrawArc(const SharedPtr< Pen > &pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Draws the specified arc using the specified pen on the surface represented by the current object.
void DrawImage(const SharedPtr< Image > &image, const ArrayPtr< PointF > &destPoints)
NOT IMPLEMENTED.
void Clear(Color color)
Clears the drawing surface represented by the current object and fills it with the specified color.
void ResetTransform()
Resets the world transformation matrix of the current object so that it becomes an identity matrix.
SizeF MeasureString(String const &str, System::SharedPtr< Font > const &font, SizeF const &layoutArea, System::SharedPtr< StringFormat > const &stringFormat, int &charactersFitted, int &linesFilled) const
NOT IMPLEMENTED.
void DrawCurve(const SharedPtr< Pen > &pen, const ArrayPtr< Point > &points, int32_t offset, int32_t numberOfSegments, float tension=0.5f)
Draws a spline using the specified pen.
void FillEllipse(const SharedPtr< Brush > &brush, Rectangle rect)
Fills the interior of the ellipse specified by the bounding rectangle using the specified brush.
void FillClosedCurve(const SharedPtr< Brush > &brush, const ArrayPtr< Point > &points, Drawing2D::FillMode fillmode=Drawing2D::FillMode::Alternate, float tension=0.5f)
Draws a closed spline using the specified brush.
void set_InterpolationMode(Drawing2D::InterpolationMode mode)
Sets a value that indicates the interpolation mode associated with the current object.
bool IsVisible(float x, float y, float width, float height)
NOT IMPLEMENTED.
void DrawImageUnscaled(const SharedPtr< Image > &image, int x, int y)
Draws the specified image using its original physical size at the specified location.
void SetClip(const SharedPtr< Drawing2D::GraphicsPath > &path, Drawing2D::CombineMode combineMode=Drawing2D::CombineMode::Replace)
Sets the clipping region of drawing surface represented by the current Graphics object to the result ...
void RotateTransform(float angle, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Applies the specified rotation to the world transformation matrix of the current Graphics object in t...
void SetClip(const SharedPtr< Region > &region, Drawing2D::CombineMode combineMode=Drawing2D::CombineMode::Replace)
Sets the clipping region of drawing surface represented by the current Graphics object to the result ...
void DrawLine(const SharedPtr< Pen > &pen, Point pt1, Point pt2)
Draws the specified line using the specified pen.
void set_TextRenderingHint(Text::TextRenderingHint hint)
Sets a value that specifies the quality of text rendering.
void SetClip(RectangleF rect, Drawing2D::CombineMode combineMode=Drawing2D::CombineMode::Replace)
Sets the clipping region of drawing surface represented by the current Graphics object to the result ...
void DrawImage(const SharedPtr< Image > &image, const System::Details::StackArray< PointF, N > &destPoints, const RectangleF &srcRect, GraphicsUnit srcUnit, const Imaging::ImageAttributesPtr &imgAttributes)
Draws the specified region of the specified image at the specified location.
Definition: graphics.h:412
void DrawImage(const SharedPtr< Image > &image, int x, int y)
Draws the specified image at the specified location.
float get_PageScale() const
Returns the scaling between world units and page units for the current Graphics object.
void DrawPie(const SharedPtr< Pen > &pen, RectangleF rect, float startAngle, float sweepAngle)
Draws the specified pie using the specified pen on the surface represented by the current object.
void DrawIcon(const SharedPtr< Icon > &icon, Rectangle targetRect)
NOT IMPLEMENTED.
void DrawPie(const SharedPtr< Pen > &pen, int32_t x, int32_t y, int32_t width, int32_t height, int32_t startAngle, int32_t sweepAngle)
Draws the specified pie using the specified pen on the surface represented by the current object.
void EnumerateMetafile(const SharedPtr< Imaging::Metafile > &metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, Graphics::EnumerateMetafileProc callback)
NOT IMPLEMENTED.
std::function< bool(IntPtr ptr)> DrawImageAbort
The type of a callback fuction object used as an argument for DrawImage method.
Definition: graphics.h:79
void DrawBezier(const SharedPtr< Pen > &pen, const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4)
NOT IMPLEMENTED.
void CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation=CopyPixelOperation::SourceCopy)
NOT IMPLEMENTED.
void DrawImage(const SharedPtr< Image > &image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)
Draws the specified region of the specified image at the specified location.
void ScaleTransform(float sx, float sy, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Applies the specified scale vector to the world transformation matrix of the current object.
Drawing2D::CompositingQuality get_CompositingQuality()
Returns a value that indicates the quality level used when compositing images.
void FillRectangles(const SharedPtr< Brush > &brush, const ArrayPtr< RectangleF > &rects)
Fills a series of rectangles using the specified brush.
void DrawClosedCurve(const SharedPtr< Pen > &pen, const ArrayPtr< PointF > &points, float tension=0.5f, Drawing2D::FillMode fillmode=Drawing2D::FillMode::Alternate)
Draws a closed spline using the specified pen.
void ExcludeClip(Rectangle rect)
NOT IMPLEMENTED.
void DrawRectangles(const SharedPtr< Pen > &pen, const ArrayPtr< Rectangle > &rects)
Draws a series of rectangles using the specified pen.
void DrawBezier(const SharedPtr< Pen > &pen, const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4)
NOT IMPLEMENTED.
Represents a pair of single-precision floating point X and Y coordinates of a point on a 2-dimensiona...
Definition: point_f.h:14
Represents a pair of integer X and Y coordinates of a point on a 2-dimensional plane....
Definition: point.h:15
Represents a rectangular area of an image defined as single-precision floating point X and Y coordina...
Definition: rectangle_f.h:15
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left co...
Definition: rectangle.h:19
Represents the interior of a graphic shape. Objects of this class should only be allocated using Syst...
Definition: region.h:42
Represents a pair of single-precision floating point values that represent width and height of an ima...
Definition: size_f.h:14
Represents a pair of integer values that represent width and height of an image. This type should be ...
Definition: size.h:14
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
SmoothingMode
Specifies what type of soothing (antialiasing) is applied to lines, curves and edges of filled areas.
Definition: smoothing_mode.h:9
FillMode
Specifies how to fill the interior of a closed path.
Definition: fill_mode.h:9
CombineMode
Specifies how clipping regions are combined.
Definition: combine_mode.h:7
@ Replace
One clipping region is replaced by another.
InterpolationMode
Specifies an algorithm to use when images are rotated or scaled.
Definition: interpolation_mode.h:13
CoordinateSpace
Specifies how to evaluate coordinates.
Definition: coordinate_space.h:9
PixelOffsetMode
Specifies how pixels are offset when being rendered.
Definition: pixel_offset_mode.h:9
CompositingQuality
Specifies the quality level to be used during compositing.
Definition: compositing_quality.h:9
FlushIntention
Specifies if commands in the graphics stack are terminated immediately or executed as soon as possibl...
Definition: flush_intention.h:8
MatrixOrder
Specifies the order of matrix transform operations.
Definition: matrix_order.h:7
@ Prepend
The new operation is applied before the old operation.
CompositingMode
Specifies how source colors and background colors are combined.
Definition: compositing_mode.h:7
@ Bitmap
Defines color adjustment information for Bitmap objects.
MulticastDelegate< void(EmfPlusRecordType, int32_t, int32_t, IntPtr)> PlayRecordCallback
A delegate used as a parameter in EnumerateMetafileProc function object.
Definition: play_record_callback.h:13
EmfPlusRecordType
Represents the methods that can be used with a metafile to read and write graphic commands.
Definition: emf_plus_record_type.h:8
TextRenderingHint
Specifies the quality of text rendering.
Definition: text_rendering_hint.h:9
CopyPixelOperation
Specifies how the source color in a pixel copying operation is combined with the destination color to...
Definition: copy_pixel_operation.h:11
@ SourceCopy
The source region is copied directly to the destination region.
GraphicsUnit
Represents a unit of measure.
Definition: graphics_unit.h:10
Definition: db_command.h:9