Applied John L's patches for curson scaling, image resizing

without scaling and the art provider resize bitmap patch.
    I'll look into adapting the generic file dialog to it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-03-04 18:33:57 +00:00
parent 0b40f3d80b
commit b737ad10de
14 changed files with 334 additions and 44 deletions

View File

@@ -176,6 +176,12 @@ The bitmap if one of registered providers recognizes the ID or wxNullBitmap othe
Same as \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}, but
return a wxIcon object (or wxNullIcon on failure).
\func{static wxSize}{GetSize}{\param{const wxArtClient\& }{client}, \param{bool }{platform_default = false}}
Returns the default size for the given art {\it client} by either using the topmost
wxArtProvider or if {\it platform_default} is \true then return a suitable default size for
{\it client} depending on the current platform.
\membersection{wxArtProvider::PopProvider}\label{wxartproviderctor}
\func{static bool}{PopProvider}{\void}

View File

@@ -77,10 +77,10 @@ Constructs a cursor using a cursor identifier.
Constructs a cursor from a wxImage. The cursor is monochrome, colors with the RGB elements all greater
than 127 will be foreground, colors less than this background. The mask (if any) will be used as transparent.
In MSW the foreground will be white and the background black. The cursor is resized to 32x32
In MSW the foreground will be white and the background black. If the cursor is larger than 32x32 it is resized.
In GTK, the two most frequent colors will be used for foreground and background. The cursor will be displayed
at the size of the image.
On MacOS the cursor is resized to 16x16 and currently only shown as black/white (mask respected).
On MacOS if the cursor is larger than 16x16 it is resized and currently only shown as black/white (mask respected).
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}

View File

@@ -545,6 +545,14 @@ Gets the green value of the mask colour.
Gets the red value of the mask colour.
\membersection{wxImage::GetOrFindMaskColour}\label{wximagegetgetorsetmaskcolour}
\constfunc{bool}{GetOrFindMaskColour}{\param{unsigned char}{ *r}, \param{unsigned char}{ *g}, \param{unsigned char}{ *b}}
Get the current mask colour or find a suitable unused colour that could be
used as a mask colour. Returns {\tt true} if the image currently has a mask.
\membersection{wxImage::GetPalette}\label{wximagegetpalette}
\constfunc{const wxPalette\&}{GetPalette}{\void}
@@ -831,8 +839,8 @@ Replaces the colour specified by {\it r1,g1,b1} by the colour {\it r2,g2,b2}.
\func{wxImage \&}{Rescale}{\param{int}{ width}, \param{int}{ height}}
Changes the size of the image in-place: after a call to this function, the
image will have the given width and height.
Changes the size of the image in-place by scaling it: after a call to this function,
the image will have the given width and height.
Returns the (modified) image itself.
@@ -841,6 +849,24 @@ Returns the (modified) image itself.
\helpref{Scale}{wximagescale}
\membersection{wxImage::Resize}\label{wximageresize}
\func{wxImage \&}{Resize}{\param{const wxSize\&}{ size}, \param{const wxPoint&}{ pos}, \param{int}{ red = -1}, \param{int}{ green = -1}, \param{int}{ blue = -1}}
Changes the size of the image in-place without scaling it by adding either a border
with the given colour or cropping as necessary. The image is pasted into a new
image with the given {\it size} and background colour at the position {\it pos}
relative to the upper left of the new image. If {\it red = green = blue = -1}
then use either the current mask colour if set or find, use, and set a
suitable mask colour for any newly exposed areas.
Returns the (modified) image itself.
\wxheading{See also}
\helpref{Size}{wximagesize}
\membersection{wxImage::Rotate}\label{wximagerotate}
\func{wxImage}{Rotate}{\param{double}{ angle}, \param{const wxPoint\& }{rotationCentre},
@@ -979,6 +1005,22 @@ Example:
\helpref{Rescale}{wximagerescale}
\membersection{wxImage::Size}\label{wximagesize}
\constfunc{wxImage}{Size}{\param{const wxSize\&}{ size}, \param{const wxPoint&}{ pos}, \param{int}{ red = -1}, \param{int}{ green = -1}, \param{int}{ blue = -1}}
Returns a resized version of this image without scaling it by adding either a border
with the given colour or cropping as necessary. The image is pasted into a new
image with the given {\it size} and background colour at the position {\it pos}
relative to the upper left of the new image. If {\it red = green = blue = -1}
then use either the current mask colour if set or find, use, and set a
suitable mask colour for any newly exposed areas.
\wxheading{See also}
\helpref{Resize}{wximageresize}
\membersection{wxImage::SetAlpha}\label{wximagesetalpha}
\func{void}{SetAlpha}{\param{unsigned char *}{alpha = {\tt NULL}}}
@@ -1093,6 +1135,15 @@ be set directly. In that case you will have to get access to the image data
using the \helpref{GetData}{wximagegetdata} method.
\membersection{wxImage::SetRGB}\label{wximagesetrgbrect}
\func{void}{SetRGB}{\param{wxRect \& }{rect}, \param{unsigned char }{red}, \param{unsigned char }{green}, \param{unsigned char }{blue}}
Sets the colour of the pixels within the given rectangle. This routine performs
bounds-checks for the coordinate so it can be considered a safe way to manipulate the
data.
\membersection{wxImage::operator $=$}\label{wximageassign}
\func{wxImage\& }{operator $=$}{\param{const wxImage\& }{image}}

View File

@@ -239,6 +239,14 @@ Returns {\tt true} if this rectangle has a non empty intersection with the
rectangle {\it rect} and {\tt false} otherwise.
\membersection{wxRect::IsEmpty}\label{wxrectisempty}
\constfunc{bool}{IsEmpty}{}
Returns {\tt true} if this rectangle has a width or height less than or equal to
0 and {\tt false} otherwise.
\membersection{wxRect::Offset}\label{wxrectoffset}
\func{void}{Offset}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}