X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7395c7d66926c4006934d2b4bc58875d53670427..0847e36eff0512bf3c50c01e8d9dcff5e693ada5:/interface/wx/graphics.h?ds=sidebyside diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index ac78c4cae0..10c2ea7485 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -22,18 +22,24 @@ class wxGraphicsPath : public wxGraphicsObject { public: /** - Adds an arc of a circle centering at (@a x,@a y) with radius (@a r) - from @a startAngle to @a endAngle. + Adds an arc of a circle. + + The circle is defined by the coordinates of its centre (@a x, @a y) or + @a c and its radius @a r. The arc goes from the starting angle @a + startAngle to @a endAngle either clockwise or counter-clockwise + depending on the value of @a clockwise argument. + + The angles are measured in radians but, contrary to the usual + mathematical convention, are always @e clockwise from the horizontal + axis. */ + //@{ virtual void AddArc(wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise); - /** - Adds an arc of a circle centering at @a c with radius (@a r) - from @a startAngle to @a endAngle. - */ void AddArc(const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise); + //@} /** Appends a an arc to two tangents connecting (current) to (@a x1,@a y1) @@ -213,29 +219,25 @@ enum wxAntialiasMode The description give a short equation on how the values of a resulting pixel are calculated. - @R = Result, @S = Source, @D = Destination, colors premultiplied with alpha - @Ra, @Sa, @Da their alpha components + @e R = Result, @e S = Source, @e D = Destination, colors premultiplied with alpha + @e Ra, @e Sa, @e Da their alpha components */ enum wxCompositionMode { - - /** classic Porter-Duff compositions */ - wxCOMPOSITION_CLEAR, /**< @R = 0 */ - wxCOMPOSITION_SOURCE, /**< @R = S */ - wxCOMPOSITION_OVER, /**< @R = @S + @D*(1 - @Sa) */ - wxCOMPOSITION_IN, /**< @R = @S*@Da */ - wxCOMPOSITION_OUT, /**< @R = @S*(1 - @Da) */ - wxCOMPOSITION_ATOP, /**< @R = @S*@Da + @D*(1 - @Sa) */ - - wxCOMPOSITION_DEST, /**< @R = @D, essentially a noop */ - wxCOMPOSITION_DEST_OVER, /**< @R = @S*(1 - @Da) + @D */ - wxCOMPOSITION_DEST_IN, /**< @R = @D*@Sa */ - wxCOMPOSITION_DEST_OUT, /**< @R = @D*(1 - @Sa) */ - wxCOMPOSITION_DEST_ATOP, /**< @R = @S*(1 - @Da) + @D*@Sa */ - wxCOMPOSITION_XOR, /**< @R = @S*(1 - @Da) + @D*(1 - @Sa) */ - - /** mathematical compositions */ - wxCOMPOSITION_ADD, /**< @R = @S + @D */ + wxCOMPOSITION_CLEAR, /**< @e R = 0 */ + wxCOMPOSITION_SOURCE, /**< @e R = S */ + wxCOMPOSITION_OVER, /**< @e R = @e S + @e D*(1 - @e Sa) */ + wxCOMPOSITION_IN, /**< @e R = @e S*@e Da */ + wxCOMPOSITION_OUT, /**< @e R = @e S*(1 - @e Da) */ + wxCOMPOSITION_ATOP, /**< @e R = @e S*@e Da + @e D*(1 - @e Sa) */ + + wxCOMPOSITION_DEST, /**< @e R = @e D, essentially a noop */ + wxCOMPOSITION_DEST_OVER, /**< @e R = @e S*(1 - @e Da) + @e D */ + wxCOMPOSITION_DEST_IN, /**< @e R = @e D*@e Sa */ + wxCOMPOSITION_DEST_OUT, /**< @e R = @e D*(1 - @e Sa) */ + wxCOMPOSITION_DEST_ATOP, /**< @e R = @e S*(1 - @e Da) + @e D*@e Sa */ + wxCOMPOSITION_XOR, /**< @e R = @e S*(1 - @e Da) + @e D*(1 - @e Sa) */ + wxCOMPOSITION_ADD, /**< @e R = @e S + @e D */ }; @@ -704,6 +706,12 @@ public: */ virtual wxGraphicsContext* CreateContextFromNativeWindow(void* window) = 0; + /** + Creates a wxGraphicsContext that can be used for measuring texts only. + No drawing commands are allowed. + */ + virtual wxGraphicsContext * CreateMeasuringContext() = 0; + /** Creates a native graphics font from a wxFont and a text colour. */