X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/adaaa68635b4c8a4d8c5284add40366ea3eefb07..3a6ec3c88033c43e108cb1f302717696682eb34f:/interface/wx/dc.h diff --git a/interface/wx/dc.h b/interface/wx/dc.h index 391b9ebc70..55d29cb45c 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -121,7 +121,7 @@ public: bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, int logicalFunc = wxCOPY, bool useMask = false, - wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); /** Adds the specified point to the bounding box which can be retrieved @@ -136,13 +136,6 @@ public: */ void Clear(); - /** - Performs all necessary computations for given platform and context type - after each change of scale and origin parameters. Usually called - automatically internally after such changes. - */ - virtual void ComputeScaleAndOrigin(); - /** Displays a cross hair using the current pen. This is a vertical and horizontal line the height and width of the window, centred on the @@ -207,7 +200,7 @@ public: @see SetTextForeground(), SetTextBackground(), wxMemoryDC */ void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, - bool transparent); + bool useMask = false); //@{ /** @@ -445,7 +438,7 @@ public: the string. See GetTextExtent() for how to get the dimensions of a text string, which can be used to position the text more precisely. - @note The current @ref GetLogicalFunction() "logical function" is + @note The current @ref GetLogicalFunction() "logical function" is ignored by this function. */ void DrawText(const wxString& text, wxCoord x, wxCoord y); @@ -483,7 +476,7 @@ public: @see wxDC::SetBackground() */ - const wxBrush GetBackground() const; + const wxBrush& GetBackground() const; /** Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT. @@ -497,7 +490,7 @@ public: @see wxDC::SetBrush() */ - const wxBrush GetBrush() const; + const wxBrush& GetBrush() const; /** Gets the character height of the currently set font. @@ -517,7 +510,7 @@ public: are returned as a tuple. @endWxPythonOnly */ - void GetClippingBox(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height) const; /** Returns the depth (number of bits/pixel) of this DC. @@ -532,7 +525,7 @@ public: wxNullFont initially and only after calling SetFont() a valid font is returned. */ - const wxFont GetFont() const; + const wxFont& GetFont() const; /** Gets the current layout direction of the device context. On platforms @@ -576,7 +569,7 @@ public: void GetMultiLineTextExtent(const wxString& string, wxCoord* w, wxCoord* h, wxCoord* heightLine = NULL, - wxFont* font = NULL) const; + const wxFont* font = NULL) const; /** Gets the dimensions of the string using the currently selected font. @a string is the text string to measure, @e heightLine, if non @NULL, @@ -588,7 +581,7 @@ public: @see wxFont, SetFont(), GetPartialTextExtents(), GetTextExtent() */ - const wxSize GetMultiLineTextExtent(const wxString& string) const; + wxSize GetMultiLineTextExtent(const wxString& string) const; /** Fills the @a widths array with the widths from the beginning of @a text @@ -613,7 +606,7 @@ public: @see SetPen() */ - const wxPen GetPen() const; + const wxPen& GetPen() const; /** Gets in @a colour the colour at the specified location. Not available @@ -673,7 +666,7 @@ public: @see SetTextBackground() */ - const wxColour GetTextBackground() const; + const wxColour& GetTextBackground() const; //@{ /** @@ -714,14 +707,14 @@ public: @see SetTextForeground() */ - const wxColour GetTextForeground() const; + const wxColour& GetTextForeground() const; /** Gets the current user scale factor. @see SetUserScale() */ - void GetUserScale(double x, double y); + void GetUserScale(double* x, double* y) const; //@{ /** @@ -752,15 +745,14 @@ public: to use @a initialColour on the left part of the rectangle and @a destColour on the right one. */ - void GradientFillLinear(const wxRect& rect, - const wxColour& initialColour, + void GradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, - wxDirection nDirection = wxEAST); + wxDirection nDirection = wxRIGHT); /** Returns @true if the DC is ok to use. */ - bool Ok(); + bool IsOk() const; /** Converts logical X coordinate to device coordinate, using the current @@ -1012,7 +1004,7 @@ public: /** Starts a document page (only relevant when outputting to a printer). */ - bool StartPage(); + void StartPage(); /** Copy from a source DC to this DC, specifying the destination @@ -1069,12 +1061,12 @@ public: setting the @c no-maskblt option to 1. @param xsrcMask Source x position on the mask. If both xsrcMask and ysrcMask are - -1, xsrc and ysrc will be assumed for the mask source position. - Currently only implemented on Windows. + wxDefaultCoord, @a xsrc and @a ysrc will be assumed for the mask + source position. Currently only implemented on Windows. @param ysrcMask Source y position on the mask. If both xsrcMask and ysrcMask are - -1, xsrc and ysrc will be assumed for the mask source position. - Currently only implemented on Windows. + wxDefaultCoord, @a xsrc and @a ysrc will be assumed for the mask + source position. Currently only implemented on Windows. There is partial support for Blit() in wxPostScriptDC, under X. @@ -1092,7 +1084,8 @@ public: wxCoord srcWidth, wxCoord srcHeight, int logicalFunc = wxCOPY, bool useMask = false, - wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + wxCoord xsrcMask = wxDefaultCoord, + wxCoord ysrcMask = wxDefaultCoord); };