nobody at rubyforge.org
2007-Apr-13 19:15 UTC
[Wxruby-development] [954] branches/wxruby2/wxwidgets_282: Additions to Image API 2.6 -> 2.8, remove comment cruft
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type"
content="text/html; charset=utf-8" /><style
type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[954] branches/wxruby2/wxwidgets_282: Additions to Image API 2.6
-> 2.8, remove comment cruft</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>954</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-04-13 15:15:50 -0400 (Fri, 13 Apr
2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Additions to Image API 2.6 -> 2.8, remove comment
cruft</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#brancheswxruby2wxwidgets_282doctextileimagetxtl">branches/wxruby2/wxwidgets_282/doc/textile/image.txtl</a></li>
<li><a
href="#brancheswxruby2wxwidgets_282swigclassesincludewxImageh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxImage.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a
id="brancheswxruby2wxwidgets_282doctextileimagetxtl"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/doc/textile/image.txtl (953 => 954)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/doc/textile/image.txtl        2007-04-13
19:15:04 UTC (rev 953)
+++
branches/wxruby2/wxwidgets_282/doc/textile/image.txtl        2007-04-13
19:15:50 UTC (rev 954)
</span><span class="lines">@@ -6,9 +6,9 @@
</span><span class="cx"> via image format handlers.
Functions are available to set and get image bits, so
</span><span class="cx"> it can be used for basic image
manipulation.
</span><span class="cx">
</span><del>-A Image cannot (currently) be drawn directly to a
"DC":dc.html. Instead,
</del><ins>+A Image cannot (currently) be drawn directly to a
"DC":dc.html. Instead,
</ins><span class="cx"> a platform-specific
"Bitmap":bitmap.html object must be created from it using
</span><del>-the "Bitmap::Bitmap(Image,int
depth)":bitmapctor.html constructor.
</del><ins>+the "Bitmap::Bitmap(Image,int
depth)":bitmapctor.html constructor.
</ins><span class="cx"> This bitmap can then
</span><span class="cx"> be drawn in a device context,
using "DC#draw_bitmap":dc.html#DC_drawbitmap.
</span><span class="cx">
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> corresponds to a transparent
pixel (null opacity) while a value of $255$
</span><span class="cx"> means that the pixel is 100\%
opaque.
</span><span class="cx">
</span><del>-Unlike RGB data, not all images have an alpha channel
and before using
</del><ins>+Unlike RGB data, not all images have an alpha channel
and before using
</ins><span class="cx">
"get_alpha":#Image_getalpha you should check if this image contains
</span><span class="cx"> an alpha channel with
"has_alpha":#Image_hasalpha. Note that currently only
</span><span class="cx"> images loaded from PNG files with
transparency information will have an alpha
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> The following image handlers are
available. *BMPHandler* is always
</span><span class="cx"> installed by default. To use
other image formats, install the appropriate
</span><del>-handler with
"Image#add_handler":image.html#Image_addhandler or
</del><ins>+handler with
"Image#add_handler":image.html#Image_addhandler or call
</ins><span class="cx">
"InitAllImageHandlers":initallimagehandlers.html.
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> |PCXHandler|For loading and
saving (see below).|
</span><span class="cx"> |PNMHandler|For loading and
saving (see below).|
</span><span class="cx"> |TIFFHandler|For loading and
saving.|
</span><ins>+|TGAHandler|For loading only.|
</ins><span class="cx"> |IFFHandler|For loading only.|
</span><span class="cx"> |XPMHandler|For loading and
saving.|
</span><span class="cx"> |ICOHandler|For loading and
saving.|
</span><span class="lines">@@ -65,7 +66,7 @@
</span><span class="cx">
</span><span class="cx"> h2. See also
</span><span class="cx">
</span><del>-"Bitmap":bitmap.html,
</del><ins>+"Bitmap":bitmap.html,
</ins><span class="cx">
"InitAllImageHandlers":initallimagehandlers.html
</span><span class="cx">
</span><span class="cx"> <div
id="methods">
</span><span class="lines">@@ -74,10 +75,14 @@
</span><span class="cx">
</span><span class="cx"> *
"Image.new":#Image_new
</span><span class="cx"> *
"Image#add_handler":#Image_addhandler
</span><ins>+* "Image#blur":#Image_blur
+* "Image#blur_horizontal":#Image_blurhorizontal
+* "Image#blur_vertical":#Image_blurvertical
</ins><span class="cx"> *
"Image#clean_up_handlers":#Image_cleanuphandlers
</span><span class="cx"> *
"Image#compute_histogram":#Image_computehistogram
</span><span class="cx"> *
"Image#convert_alpha_to_mask":#Image_convertalphatomask
</span><span class="cx"> *
"Image#convert_to_bitmap":#Image_converttobitmap
</span><ins>+*
"Image#convert_to_greyscale":#Image_converttogreyscale
</ins><span class="cx"> *
"Image#convert_to_mono":#Image_converttomono
</span><span class="cx"> *
"Image#copy":#Image_copy
</span><span class="cx"> *
"Image#create":#Image_create
</span><span class="lines">@@ -112,7 +117,7 @@
</span><span class="cx"> *
"Image#insert_handler":#Image_inserthandler
</span><span class="cx"> *
"Image#is_transparent":#Image_istransparent
</span><span class="cx"> *
"Image#load_file":#Image_loadfile
</span><del>-* "Image#ok":#Image_ok
</del><ins>+* "Image#is_ok":#Image_isok
</ins><span class="cx"> *
"RGBValue::RGBValue":#Image_RGBValue
</span><span class="cx"> *
"Image#rg_bto_hsv":#Image_rgbtohsv
</span><span class="cx"> *
"Image#remove_handler":#Image_removehandler
</span><span class="lines">@@ -144,7 +149,7 @@
</span><span class="cx">
</span><span class="cx"> *Image.new*(%(arg-type)Image%
image)
</span><span class="cx">
</span><del>-Copy constructor.
</del><ins>+Copy constructor, uses "reference
counting":trefcount.html.
</ins><span class="cx">
</span><span class="cx"> *Image.new*(%(arg-type)Bitmap%
bitmap)
</span><span class="cx">
</span><span class="lines">@@ -162,7 +167,7 @@
</span><span class="cx"> *Image.new*(%(arg-type)Integer%
width, %(arg-type)Integer% height, %(arg-type)Integer% data,
</span><span class="cx"> %(arg-type)Boolean%
static_data = )
</span><span class="cx">
</span><del>-Creates an image from given data with the given width
and height. If
</del><ins>+Creates an image from given data with the given width
and height. If
</ins><span class="cx"> _static_data_ is true, then Image
will not delete the actual
</span><span class="cx"> image data in its destructor,
otherwise it will free it by calling
</span><span class="cx"> _free()_.
</span><span class="lines">@@ -202,6 +207,7 @@
</span><span class="cx"> |BITMAP_TYPE_PCX|Load a PCX
bitmap file.|
</span><span class="cx"> |BITMAP_TYPE_PNM|Load a PNM
bitmap file.|
</span><span class="cx"> |BITMAP_TYPE_TIF|Load a TIFF
bitmap file.|
</span><ins>+|BITMAP_TYPE_TGA|Load a TGA bitmap file.|
</ins><span class="cx"> |BITMAP_TYPE_XPM|Load a XPM bitmap
file.|
</span><span class="cx"> |BITMAP_TYPE_ICO|Load a Windows
icon file (ICO).|
</span><span class="cx"> |BITMAP_TYPE_CUR|Load a Windows
cursor file (CUR).|
</span><span class="lines">@@ -210,8 +216,8 @@
</span><span class="cx">
</span><span class="cx"> * _mimetype_ MIME type string
(for example ''image/jpeg'')
</span><span class="cx"> * _index_ Index of the image to
load in the case that the image file contains multiple images.
</span><del>-This is only used by GIF, ICO and TIFF handlers. The
default value (-1) means
-"choose the default image" and is interpreted as the first image
(index=0) by
</del><ins>+This is only used by GIF, ICO and TIFF handlers. The
default value (-1) means
+"choose the default image" and is interpreted as the first image
(index=0) by
</ins><span class="cx"> the GIF and TIFF handler and as
the largest and most colourful one by the ICO handler.
</span><span class="cx"> * _xpmData_ A pointer to XPM
image data.
</span><span class="cx">
</span><span class="lines">@@ -220,10 +226,10 @@
</span><span class="cx"> Depending on how Widgets has been
configured, not all formats may be available.
</span><span class="cx">
</span><span class="cx"> Note: any handler other than BMP
must be previously
</span><del>-initialized with
"Image#add_handler":image.html#Image_addhandler or
</del><ins>+initialized with
"Image#add_handler":image.html#Image_addhandler or
</ins><span class="cx">
"InitAllImageHandlers":initallimagehandlers.html.
</span><span class="cx">
</span><del>-Note: you can use
"get_option_int":#Image_getoptionint to get the
</del><ins>+Note: you can use
"get_option_int":#Image_getoptionint to get the
</ins><span class="cx"> hotspot for loaded cursor file:
</span><span class="cx">
</span><span class="cx"> int hotspot_x =
image.GetOptionInt(IMAGE_OPTION_CUR_HOTSPOT_X);
</span><span class="lines">@@ -243,6 +249,7 @@
</span><span class="cx"> *destructor*()
</span><span class="cx">
</span><span class="cx"> Destructor.
</span><ins>+See "reference-counted object
destruction":refcountdestruct.html for more info.
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> h3(#Image_addhandler).
Image#add_handler
</span><span class="lines">@@ -264,6 +271,46 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><ins>+
+h3(#Image_blur). Image#blur
+
+ "Image":image.html *blur*(%(arg-type)Integer% blurRadius)
+
+Blurs the image in both horizontal and vertical directions by the specified
pixel
+_blurRadius_. This should not be used when using a single mask colour
+for transparency.
+
+h4. See also
+
+"blur_horizontal":#Image_blurhorizontal
+"blur_vertical":#Image_blurvertical
+
+
+h3(#Image_horzblur). Image#blur_horizontal
+
+ "Image":image.html *blur_horizontal*(%(arg-type)Integer% blurRadius)
+
+Blurs the image in the horizontal direction only. This should not be used
+when using a single mask colour for transparency.
+h4. See also
+
+"Blur":imageblur.html
+"blur_vertical":#Image_blurvertical
+
+
+h3(#Image_vertblur). Image#blur_vertical
+
+ "Image":image.html *blur_vertical*(%(arg-type)Integer% blurRadius)
+
+Blurs the image in the vertical direction only. This should not be used
+when using a single mask colour for transparency.
+
+h4. See also
+
+"Blur":imageblur.html
+"blur_horizontal":#Image_blurhorizontal
+
+
</ins><span class="cx"> h3(#Image_cleanuphandlers).
Image#clean_up_handlers
</span><span class="cx">
</span><span class="cx"> *clean_up_handlers*()
</span><span class="lines">@@ -277,8 +324,8 @@
</span><span class="cx">
</span><span class="cx"> Integer
*compute_histogram*(%(arg-type)ImageHistogram% histogram)
</span><span class="cx">
</span><del>-Computes the histogram of the image. _histogram_ is a
reference to
-ImageHistogram object. ImageHistogram is a specialization of
</del><ins>+Computes the histogram of the image. _histogram_ is a
reference to
+ImageHistogram object. ImageHistogram is a specialization of
</ins><span class="cx"> "HashMap":hashmap.html
"template" and is defined as follows:
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -314,7 +361,7 @@
</span><span class="cx">
</span><span class="cx"> h4. Return value
</span><span class="cx">
</span><del>- if FindFirstUnusedColour returns , otherwise.
</del><ins>+ if FindFirstUnusedColour returns , otherwise.
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> h3(#Image_converttobitmap).
Image#convert_to_bitmap
</span><span class="lines">@@ -325,13 +372,25 @@
</span><span class="cx"> (which takes Image and depth as
its arguments) instead.
</span><span class="cx">
</span><span class="cx">
</span><ins>+h3(#Image_converttogreyscale).
Image#convert_to_greyscale
+
+ "Image":image.html *convert_to_greyscale*(%(arg-type)double% lr =
0.299,
+ %(arg-type)double% lg = 0.587,
+ %(arg-type)double% lb = 0.114)
+
+Returns a greyscale version of the image. The returned image uses the luminance
+component of the original to calculate the greyscale. Defaults to using
+ITU-T BT.601 when converting to YUV, where every pixel equals
+(R * _lr_) + (G * _lg_) + (B * _lb_).
+
+
</ins><span class="cx"> h3(#wxbitmapconverttomono).
Image#convert_to_mono
</span><span class="cx">
</span><span class="cx"> "Image":image.html
*convert_to_mono*(%(arg-type)Integer% r, %(arg-type)Integer% g,
</span><span class="cx">
%(arg-type)Integer% b)
</span><span class="cx">
</span><span class="cx"> Returns monochromatic version of
the image. The returned image has white
</span><del>-colour where the original has _(r,g,b)_ colour and
black colour
</del><ins>+colour where the original has _(r,g,b)_ colour and black
colour
</ins><span class="cx"> everywhere else.
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -444,7 +503,7 @@
</span><span class="cx"> Example:
</span><span class="cx">
</span><span class="cx">
</span><del>- FileDialog FileDlg( this, "Choose
Image", ::GetWorkingDirectory(), "", _("Image Files ")
+ Image::GetImageExtWildcard(), OPEN );
</del><ins>+ FileDialog FileDlg( this, "Choose Image",
::GetCwd(), "", _("Image Files ") +
Image::GetImageExtWildcard(), OPEN );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> h4. See also
</span><span class="lines">@@ -509,7 +568,7 @@
</span><span class="cx"> Integer
*get_image_count*(%(arg-type)InputStream% stream,
</span><span class="cx">
%(arg-type)Integer% type = BITMAP_TYPE_ANY)
</span><span class="cx">
</span><del>-If the image file contains more than one image and the
image handler is capable
</del><ins>+If the image file contains more than one image and the
image handler is capable
</ins><span class="cx"> of retrieving these individually,
this function will return the number of
</span><span class="cx"> available images.
</span><span class="cx">
</span><span class="lines">@@ -582,7 +641,7 @@
</span><span class="cx"> Boolean
*get_or_find_mask_colour*(%(arg-type)Integer% r, %(arg-type)Integer% g,
</span><span class="cx">
%(arg-type)Integer% b)
</span><span class="cx">
</span><del>-Get the current mask colour or find a suitable unused
colour that could be
</del><ins>+Get the current mask colour or find a suitable unused
colour that could be
</ins><span class="cx"> used as a mask colour. Returns
@true@ if the image currently has a mask.
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -591,11 +650,11 @@
</span><span class="cx"> "Palette":palette.html
*get_palette*()
</span><span class="cx">
</span><span class="cx"> Returns the palette associated
with the image. Currently the palette is only
</span><del>-used when converting to Bitmap under Windows.
</del><ins>+used when converting to Bitmap under Windows. Some of
the Image handlers
+have been modified to set the palette if one exists in the image file (usually
+256 or less colour images in GIF or PNG format).
</ins><span class="cx">
</span><del>-Eventually Image handlers will set the palette if one
exists in the image file.
</del><span class="cx">
</span><del>-
</del><span class="cx"> h3(#Image_getred). Image#get_red
</span><span class="cx">
</span><span class="cx"> Integer
*get_red*(%(arg-type)Integer% x, %(arg-type)Integer% y)
</span><span class="lines">@@ -607,7 +666,7 @@
</span><span class="cx">
</span><span class="cx"> "Image":image.html
*get_sub_image*(%(arg-type)Rect% rect)
</span><span class="cx">
</span><del>-Returns a sub image of the current one as long as the
rect belongs entirely to
</del><ins>+Returns a sub image of the current one as long as the
rect belongs entirely to
</ins><span class="cx"> the image.
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -680,7 +739,7 @@
</span><span class="cx">
</span><span class="cx"> Gets a user-defined option as an
integer. The function is case-insensitive to _name_.
</span><span class="cx">
</span><del>-If the given option is not present, the function
returns $0$. Use
</del><ins>+If the given option is not present, the function returns
$0$. Use
</ins><span class="cx">
"Image#has_option":image.html#Image_hasoption is $0$ is a possibly
valid value
</span><span class="cx"> for the option.
</span><span class="cx">
</span><span class="lines">@@ -736,7 +795,7 @@
</span><span class="cx">
</span><span class="cx"> h4. See also
</span><span class="cx">
</span><del>-"ImageHandler":imagehandler.html,
</del><ins>+"ImageHandler":imagehandler.html,
</ins><span class="cx">
"InitAllImageHandlers":initallimagehandlers.html
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -805,15 +864,15 @@
</span><span class="cx">
</span><span class="cx"> * _mimetype_ MIME type string
(for example ''image/jpeg'')
</span><span class="cx"> * _index_ Index of the image to
load in the case that the image file contains multiple images.
</span><del>-This is only used by GIF, ICO and TIFF handlers. The
default value (-1) means
-"choose the default image" and is interpreted as the first image
(index=0) by
</del><ins>+This is only used by GIF, ICO and TIFF handlers. The
default value (-1) means
+"choose the default image" and is interpreted as the first image
(index=0) by
</ins><span class="cx"> the GIF and TIFF handler and as
the largest and most colourful one by the ICO handler.
</span><span class="cx">
</span><span class="cx"> h4. Remarks
</span><span class="cx">
</span><span class="cx"> Depending on how Widgets has been
configured, not all formats may be available.
</span><span class="cx">
</span><del>-Note: you can use
"get_option_int":#Image_getoptionint to get the
</del><ins>+Note: you can use
"get_option_int":#Image_getoptionint to get the
</ins><span class="cx"> hotspot for loaded cursor file:
</span><span class="cx">
</span><span class="cx"> int hotspot_x =
image.GetOptionInt(IMAGE_OPTION_CUR_HOTSPOT_X);
</span><span class="lines">@@ -836,9 +895,9 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-h3(#Image_ok). Image#ok
</del><ins>+h3(#Image_isok). Image#is_ok
</ins><span class="cx">
</span><del>- Boolean *ok*()
</del><ins>+ Boolean *is_ok*()
</ins><span class="cx">
</span><span class="cx"> Returns true if image data is
present.
</span><span class="cx">
</span><span class="lines">@@ -847,7 +906,7 @@
</span><span class="cx">
</span><span class="cx"> *rgb_value*(%(arg-type)Integer%
r = 0, %(arg-type)Integer% g = 0, %(arg-type)Integer% b = 0)
</span><span class="cx">
</span><del>-Constructor for RGBValue, an object that contains
values for red, green and blud which
</del><ins>+Constructor for RGBValue, an object that contains values
for red, green and blue which
</ins><span class="cx"> represent the value of a color. It
is used by "Image#hs_vto_rgb":image.html#Image_hsvtorgb
</span><span class="cx"> and
"Image#rg_bto_hsv":image.html#Image_rgbtohsv, which
</span><span class="cx"> converts between HSV color space
and RGB color space.
</span><span class="lines">@@ -900,11 +959,14 @@
</span><span class="cx">
</span><span class="cx"> h3(#Image_rescale). Image#rescale
</span><span class="cx">
</span><del>- "Image":image.html
*rescale*(%(arg-type)Integer% width, %(arg-type)Integer% height)
</del><ins>+ "Image":image.html
*rescale*(%(arg-type)Integer% width, %(arg-type)Integer% height,
+ %(arg-type)Integer% quality = IMAGE_QUALITY_NORMAL)
</ins><span class="cx">
</span><del>-Changes the size of the image in-place by scaling it:
after a call to this function,
</del><ins>+Changes the size of the image in-place by scaling it:
after a call to this function,
</ins><span class="cx"> the image will have the given
width and height.
</span><span class="cx">
</span><ins>+For a description of the _quality_ parameter, see the
"Scale":imagescale.html function.
+
</ins><span class="cx"> Returns the (modified) image
itself.
</span><span class="cx">
</span><span class="cx"> h4. See also
</span><span class="lines">@@ -919,11 +981,11 @@
</span><span class="cx">
%(arg-type)Integer% green = -1,
</span><span class="cx">
%(arg-type)Integer% blue = -1)
</span><span class="cx">
</span><del>-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 _size_ and background colour at the position _pos_
-relative to the upper left of the new image. If _red = green = blue = -1_
-then use either the current mask colour if set or find, use, and set a
</del><ins>+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 _size_ and background colour at the position _pos_
+relative to the upper left of the new image. If _red = green = blue = -1_
+then use either the current mask colour if set or find, use, and set a
</ins><span class="cx"> suitable mask colour for any newly
exposed areas.
</span><span class="cx">
</span><span class="cx"> Returns the (modified) image
itself.
</span><span class="lines">@@ -1011,8 +1073,8 @@
</span><span class="cx">
</span><span class="cx"> Depending on how Widgets has been
configured, not all formats may be available.
</span><span class="cx">
</span><del>-Note: you can use
"get_option_int":#Image_getoptionint to set the
-hotspot before saving an image into a cursor file (default hotspot is in
</del><ins>+Note: you can use
"get_option_int":#Image_getoptionint to set the
+hotspot before saving an image into a cursor file (default hotspot is in
</ins><span class="cx"> the centre of the image):
</span><span class="cx">
</span><span class="cx">
image.SetOption(IMAGE_OPTION_CUR_HOTSPOT_X, hotspotX);
</span><span class="lines">@@ -1031,15 +1093,32 @@
</span><span class="cx">
</span><span class="cx"> h3(#Image_scale). Image#scale
</span><span class="cx">
</span><del>- "Image":image.html
*scale*(%(arg-type)Integer% width, %(arg-type)Integer% height)
</del><ins>+ "Image":image.html
*scale*(%(arg-type)Integer% width, %(arg-type)Integer% height,
+ %(arg-type)Integer% quality = IMAGE_QUALITY_NORMAL)
</ins><span class="cx">
</span><span class="cx"> Returns a scaled version of the
image. This is also useful for
</span><span class="cx"> scaling bitmaps in general as the
only other way to scale bitmaps
</span><span class="cx"> is to blit a MemoryDC into
another MemoryDC.
</span><span class="cx">
</span><del>-It may be mentioned that the GTK port uses this
function internally
-to scale bitmaps when using mapping modes in DC.
</del><ins>+* _quality_ Determines what method to use for resampling
the image. Can be one of the following:
</ins><span class="cx">
</span><ins>+
+|*IMAGE_QUALITY_NORMAL*|Uses the normal default scaling method of pixel
replication|
+|*IMAGE_QUALITY_HIGH*|Uses bicubic and box averaging resampling methods for
upsampling and downsampling respectively|
+
+
+It should be noted that although using IMAGE_QUALITY_HIGH produces much nicer
+looking results it is a slower method. Downsampling will use the box averaging
method
+which seems to operate very fast. If you are upsampling larger images using
+this method you will most likely notice that it is a bit slower and in extreme
cases
+it will be quite substantially slower as the bicubic algorithm has to process a
lot of
+data.
+
+It should also be noted that the high quality scaling may not work as expected
+when using a single mask colour for transparency, as the scaling will blur the
+image and will therefore remove the mask partially. Using the alpha channel
+will work.
+
</ins><span class="cx"> Example:
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1071,11 +1150,11 @@
</span><span class="cx"> %(arg-type)Integer%
green = -1,
</span><span class="cx"> %(arg-type)Integer%
blue = -1)
</span><span class="cx">
</span><del>-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 _size_ and background colour at the position _pos_
-relative to the upper left of the new image. If _red = green = blue = -1_
-then use either the current mask colour if set or find, use, and set a
</del><ins>+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 _size_ and background colour at the position _pos_
+relative to the upper left of the new image. If _red = green = blue = -1_
+then use either the current mask colour if set or find, use, and set a
</ins><span class="cx"> suitable mask colour for any newly
exposed areas.
</span><span class="cx">
</span><span class="cx"> h4. See also
</span><span class="lines">@@ -1090,10 +1169,10 @@
</span><span class="cx"> This function is similar to
"set_data":#Image_setdata and has similar
</span><span class="cx"> restrictions. The pointer passed
to it may however be @NULL@ in which case
</span><span class="cx"> the function will allocate the
alpha array internally -- this is useful to add
</span><del>-alpha channel data to an image which doesn''t
have any. If the pointer is not
-@NULL@, it must have one byte for each image pixel and be allocated with
</del><ins>+alpha channel data to an image which doesn''t
have any. If the pointer is not
+@NULL@, it must have one byte for each image pixel and be allocated with
</ins><span class="cx"> @malloc()@. Image takes ownership
of the pointer and will free it unless
</span><del>-static_data parameter is set.to -- in this case the
caller should
</del><ins>+static_data parameter is set to -- in this case the
caller should
</ins><span class="cx"> do it.
</span><span class="cx">
</span><span class="cx"> *set_alpha*(%(arg-type)Integer%
x, %(arg-type)Integer% y, %(arg-type)Integer% alpha)
</span><span class="lines">@@ -1148,13 +1227,13 @@
</span><span class="cx"> Sets image''s mask so
that the pixels that have RGB value of _mr,mg,mb_
</span><span class="cx"> in _mask_ will be masked in the
image. This is done by first finding an
</span><span class="cx"> unused colour in the image,
setting this colour as the mask colour and then
</span><del>-using this colour to draw all pixels in the image who
corresponding pixel
</del><ins>+using this colour to draw all pixels in the image who
corresponding pixel
</ins><span class="cx"> in _mask_ has given RGB value.
</span><span class="cx">
</span><span class="cx"> h4. Return value
</span><span class="cx">
</span><span class="cx"> Returns false if _mask_ does not
have same dimensions as the image or if
</span><del>-there is no unused colour left. Returns true if the
mask was successfully
</del><ins>+there is no unused colour left. Returns true if the mask
was successfully
</ins><span class="cx"> applied.
</span><span class="cx">
</span><span class="cx"> h4. Notes
</span><span class="lines">@@ -1196,7 +1275,7 @@
</span><span class="cx"> Sets the pixel at the given
coordinate. This routine performs bounds-checks
</span><span class="cx"> for the coordinate so it can be
considered a safe way to manipulate the
</span><span class="cx"> data, but in some cases this
might be too slow so that the data will have to
</span><del>-be set directly. In that case you will have to get
access to the image data
</del><ins>+be set directly. In that case you will have to get
access to the image data
</ins><span class="cx"> using the
"get_data":#Image_getdata method.
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1214,9 +1293,7 @@
</span><span class="cx">
</span><span class="cx"> "Image&
":image& .html *operator $=$*(%(arg-type)Image% image)
</span><span class="cx">
</span><del>-Assignment operator. This operator does not copy any
data, but instead
-passes a pointer to the data in _image_ and increments a reference
-counter. It is a fast operation.
</del><ins>+Assignment operator, using "reference
counting":trefcount.html.
</ins><span class="cx">
</span><span class="cx"> h4. Parameters
</span><span class="cx">
</span><span class="lines">@@ -1227,34 +1304,4 @@
</span><span class="cx"> Returns ''this''
object.
</span><span class="cx">
</span><span class="cx">
</span><del>-h3(#Image_equal). Image#=</del><span
class="cx">
</span><del>- Boolean *operator $==$*(%(arg-type)Image% image)
-
-Equality operator. This operator tests whether the internal data pointers are
-equal (a fast test).
-
-h4. Parameters
-
-* _image_ Image to compare with ''this''
-
-h4. Return value
-
-Returns true if the images were effectively equal, false otherwise.
-
-
-h3(#Image_notequal). Image#!-
- Boolean *operator $!=$*(%(arg-type)Image% image)
-
-Inequality operator. This operator tests whether the internal data pointers are
-unequal (a fast test).
-
-h4. Parameters
-
-* _image_ Image to compare with ''this''
-
-h4. Return value
-
-Returns true if the images were unequal, false otherwise.
-
</del></span></pre></div>
<a
id="brancheswxruby2wxwidgets_282swigclassesincludewxImageh"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/swig/classes/include/wxImage.h (953 =>
954)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/swig/classes/include/wxImage.h        2007-04-13
19:15:04 UTC (rev 953)
+++
branches/wxruby2/wxwidgets_282/swig/classes/include/wxImage.h        2007-04-13
19:15:50 UTC (rev 954)
</span><span class="lines">@@ -8,595 +8,90 @@
</span><span class="cx"> class wxImage : public wxObject
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-        /**
-         *
\brief Default constructor.
-        */
-
</del><span class="cx"> wxImage() ;
</span><del>-        /**
-         *
\brief Copy constructor.
-         *
\param const wxImage&
-        */
-
</del><span class="cx"> wxImage(const wxImage&
image ) ;
</span><del>-        /**
-         *
\brief (Deprecated form, use
-instead.) Constructs an image from a platform-dependent bitmap. This preserves
-mask information so that bitmaps and images can be converted back
-and forth without loss in that respect.
-         *
\param const wxBitmap&
-        */
-
</del><span class="cx"> //wxImage(const wxBitmap&
bitmap );
</span><del>-        /**
-         *
\brief Creates an image with the given width and height. If is true, the new
image will be initialized to black.
-Otherwise, the image data will be uninitialized.
-         *
\param int
-         *
\param int
-         *
\param bool
-        */
-
</del><span class="cx"> wxImage(int width , int
height);
</span><del>-        /**
-         *
\brief Creates an image from given data with the given width and height. If
- is true, then wxImage will not delete the actual
-image data in its destructor, otherwise it will free it by calling
- .
-         *
\param int
-         *
\param int
-         *
\param unsigned char*
-         *
\param bool
-        */
-
</del><span class="cx"> wxImage(int width , int
height , unsigned char* data , bool static_data = false) ;
</span><del>-        /**
-         *
\brief
-         *
\param const wxString&
-         *
\param long
-         *
\param int
-        */
-
</del><span class="cx"> wxImage(const wxString&
name , long type = wxBITMAP_TYPE_ANY, int index = -1) ;
</span><del>-        /**
-         *
\brief Loads an image from a file.
-         *
\param const wxString&
-         *
\param const wxString&
-         *
\param int
-        */
-
- wxImage(const wxString& name , const wxString& mimetype , int
index = -1) ;
-        /**
-         *
\brief
-         *
\param wxInputStream&
-         *
\param long
-         *
\param int
-        */
-
</del><ins>+ wxImage(const wxString& name , const
wxString& mimetype , int index = -1);
</ins><span class="cx"> wxImage(wxInputStream&
stream , long type = wxBITMAP_TYPE_ANY, int index = -1) ;
</span><del>-        /**
-         *
\brief
-         *
\param wxInputStream&
-         *
\param const wxString&
-         *
\param int
-        */
-
</del><span class="cx"> wxImage(wxInputStream&
stream , const wxString& mimetype , int index = -1) ;
</span><del>-        /**
-         *
\brief Destructor.
-        */
-
</del><span class="cx"> virtual ~wxImage() ;
</span><del>-        /**
-         *
\brief Adds a handler to the end of the static list of format handlers.
-         *
\param wxImageHandler*
-        */
-
</del><span class="cx"> static void
AddHandler(wxImageHandler* handler ) ;
</span><del>-        /**
-         *
\brief returns true if the current image handlers can read this file
-
-\pythonnote{In wxPython this static method is named .}
-         *
\param const wxString&
-        */
-
</del><span class="cx"> bool AddHandler(const
wxString& filename ) ;
</span><del>-        /**
-         *
\brief Deletes all image handlers.
</del><ins>+ wxImage Blur(int radius);
+ wxImage BlurHorizontal(int radius);
+ wxImage BlurVertical(int radius);
</ins><span class="cx">
</span><del>-This function is called by wxWindows on exit.
-        */
-
</del><span class="cx"> static void CleanUpHandlers() ;
</span><del>-        /**
-         *
\brief Computes the histogram of the image. is a reference to
-wxImageHistogram object. wxImageHistogram is a specialization of
- "template" and is defined as follows:
-         *
\param wxImageHistogram&
-        */
-
</del><span class="cx"> unsigned long
ComputeHistogram(wxImageHistogram& histogram ) const;
</span><del>-        /**
-         *
\brief Deprecated, use equivalent
-(which takes wxImage and depth as its arguments) instead.
-        */
</del><ins>+ bool ConvertAlphaToMask(unsigned char threshold =
wxIMAGE_ALPHA_THRESHOLD);
</ins><span class="cx">
</span><span class="cx"> //wxBitmap ConvertToBitmap()
const;
</span><del>-        /**
-         *
\brief Returns monochromatic version of the image. The returned image has white
-colour where the original has colour and black colour
-everywhere else.
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><ins>+ wxImage ConvertToGreyscale( double lr = 0.299,
double lg = 0.587, double lb = 0.114 ) const;
</ins><span class="cx"> wxImage ConvertToMono(unsigned
char r , unsigned char g , unsigned char b ) const;
</span><del>-        /**
-         *
\brief Returns an identical copy of the image.
-        */
-
</del><span class="cx"> wxImage Copy() const;
</span><del>-        /**
-         *
\brief Creates a fresh image. If is true, the new image will be initialized
to black.
-Otherwise, the image data will be uninitialized.
-         *
\param int
-         *
\param int
-         *
\param bool
-        */
-
</del><span class="cx"> void Create(int width , int
height );
</span><del>-        /**
-         *
\brief Destroys the image data.
-        */
-
</del><span class="cx"> void Destroy();
</span><del>-        /**
-         *
\brief Finds the first colour that is never used in the image. The search begins
at
-given initial colour and continues by increasing R, G and B components (in this
-order) by 1 until an unused colour is found or the colour space exhausted.
-         *
\param unsigned char *
-         *
\param unsigned char *
-         *
\param unsigned char *
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><span class="cx"> bool
FindFirstUnusedColour(unsigned char * r , unsigned char * g , unsigned char *
b , unsigned char startR = 1, unsigned char startG = 0, unsigned char startB =
0) ;
</span><del>-        /**
-         *
\brief Finds the handler with the given name.
-         *
\param const wxString&
-        */
-
</del><span class="cx"> static wxImageHandler*
FindHandler(const wxString& name ) ;
</span><del>-        /**
-         *
\brief Finds the handler associated with the given extension and type.
-         *
\param const wxString&
-         *
\param long
-        */
-
</del><span class="cx"> static wxImageHandler*
FindHandler(const wxString& extension , long imageType ) ;
</span><del>-        /**
-         *
\brief Finds the handler associated with the given image type.
-         *
\param long
-        */
-
</del><span class="cx"> static wxImageHandler*
FindHandler(long imageType ) ;
</span><del>-        /**
-         *
\brief Finds the handler associated with the given MIME type.
-         *
\param const wxString&
-        */
-
</del><span class="cx"> static wxImageHandler*
FindHandlerMime(const wxString& mimetype ) ;
</span><del>-        /**
-         *
\brief Iterates all registered wxImageHandler objects, and returns a string
containing file extension masks
-suitable for passing to file open/save dialog boxes.
-        */
-
</del><span class="cx"> static wxString
GetImageExtWildcard() ;
</span><del>-        /**
-         *
\brief Returns the alpha value for the given pixel. This function may only be
called
-for the images with alpha channel, use to
-check for this.
-
-The returned value is the of the image, i.e. the value of 0
-corresponds to the transparent pixels while the value of 255 -- to the opaque
-ones.
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> unsigned char GetAlpha(int x ,
int y ) const;
</span><del>-        /**
-         *
\brief Returns pointer to the array storing the alpha values for this image.
This
-pointer is for the images without the alpha channel. If the image
-does have it, this pointer may be used to directly manipulate the alpha values
-which are stored as the ones.
-        */
-
</del><span class="cx"> unsigned char * GetAlpha()
const;
</span><del>-        /**
-         *
\brief Returns the blue intensity at the given coordinate.
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> unsigned char GetBlue(int x ,
int y ) const;
</span><del>-        /**
-         *
\brief Returns the image data as an array. This is most often used when doing
-direct image manipulation. The return value points to an array of
-characters in RGBRGBRGB$\ldots$ format in the top-to-bottom, left-to-right
-order, that is the first RGB triplet corresponds to the pixel $(0, 0)$, the
-second one --- to $(0, 1)$ and so on.
-
-You should not delete the returned pointer nor pass it to
- .
-        */
-
</del><span class="cx"> unsigned char* GetData() const;
</span><del>-        /**
-         *
\brief Returns the green intensity at the given coordinate.
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> unsigned char GetGreen(int x ,
int y ) const;
</span><del>-        /**
-         *
\brief
-         *
\param const wxString&
-         *
\param long
-        */
-
</del><span class="cx"> static int GetImageCount(const
wxString& filename , long type = wxBITMAP_TYPE_ANY) ;
</span><del>-        /**
-         *
\brief If the image file contains more than one image and the image handler is
capable
-of retrieving these individually, this function will return the number of
-available images.
-         *
\param wxInputStream&
-         *
\param long
-        */
-
</del><span class="cx"> static int
GetImageCount(wxInputStream& stream , long type = wxBITMAP_TYPE_ANY) ;
</span><del>-        /**
-         *
\brief Returns the static list of image format handlers.
-        */
-
</del><span class="cx"> static wxList& GetHandlers()
;
</span><del>-        /**
-         *
\brief Gets the height of the image in pixels.
-        */
-
</del><span class="cx"> int GetHeight() const;
</span><del>-        /**
-         *
\brief Gets the blue value of the mask colour.
-        */
-
</del><span class="cx"> unsigned char GetMaskBlue()
const;
</span><del>-        /**
-         *
\brief Gets the green value of the mask colour.
-        */
-
</del><span class="cx"> unsigned char GetMaskGreen()
const;
</span><del>-        /**
-         *
\brief Gets the red value of the mask colour.
-        */
-
</del><span class="cx"> unsigned char GetMaskRed()
const;
</span><del>-        /**
-         *
\brief Returns the palette associated with the image. Currently the palette is
only
-used when converting to wxBitmap under Windows.
-
-Eventually wxImage handlers will set the palette if one exists in the image
file.
-        */
-
</del><span class="cx"> const wxPalette&
GetPalette() const;
</span><del>-        /**
-         *
\brief Returns the red intensity at the given coordinate.
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> unsigned char GetRed(int x ,
int y ) const;
</span><del>-        /**
-         *
\brief Returns a sub image of the current one as long as the rect belongs
entirely to
-the image.
-         *
\param const wxRect&
-        */
-
</del><span class="cx"> wxImage GetSubImage(const
wxRect& rect ) const;
</span><del>-        /**
-         *
\brief Gets the width of the image in pixels.
-        */
-
</del><span class="cx"> int GetWidth() const;
</span><del>-        /**
-         *
\brief
-        */
-
</del><span class="cx"> bool HasAlpha() const;
</span><del>-        /**
-         *
\brief Returns true if there is a mask active, false otherwise.
-        */
-
</del><span class="cx"> bool HasMask() const;
</span><del>-        /**
-         *
\brief Gets a user-defined option. The function is case-insensitive to .
-
-For example, when saving as a JPEG file, the option is
-used, which is a number between 0 and 100 (0 is terrible, 100 is very good).
-         *
\param const wxString&
-        */
-
</del><span class="cx"> wxString GetOption(const
wxString& name ) const;
</span><del>-        /**
-         *
\brief Gets a user-defined option as an integer. The function is
case-insensitive to .
-         *
\param const wxString&
-        */
-
</del><span class="cx"> int GetOptionInt(const
wxString& name ) const;
</span><del>-        /**
-         *
\brief Returns true if the given option is present. The function is
case-insensitive to .
-         *
\param const wxString&
-        */
-
</del><span class="cx"> bool HasOption(const
wxString& name ) const;
</span><del>-        /**
-         *
\brief
-        */
-
</del><span class="cx"> static void
InitStandardHandlers() ;
</span><del>-        /**
-         *
\brief Adds a handler at the start of the static list of format handlers.
-         *
\param wxImageHandler*
-        */
-
</del><span class="cx"> static void
InsertHandler(wxImageHandler* handler ) ;
</span><del>-        /**
-         *
\brief
-         *
\param const wxString&
-         *
\param long
-         *
\param int
-        */
-
</del><span class="cx"> bool LoadFile(const
wxString& name , long type = wxBITMAP_TYPE_ANY, int index = -1) ;
</span><del>-        /**
-         *
\brief Loads an image from a file. If no handler type is provided, the library
will
-try to autodetect the format.
-         *
\param const wxString&
-         *
\param const wxString&
-         *
\param int
-        */
-
</del><span class="cx"> bool LoadFile(const
wxString& name , const wxString& mimetype , int index = -1) ;
</span><del>-        /**
-         *
\brief
-         *
\param wxInputStream&
-         *
\param long
-         *
\param int
-        */
-
</del><span class="cx"> bool LoadFile(wxInputStream&
stream , long type , int index = -1) ;
</span><del>-        /**
-         *
\brief
-         *
\param wxInputStream&
-         *
\param const wxString&
-         *
\param int
-        */
-
</del><span class="cx"> bool LoadFile(wxInputStream&
stream , const wxString& mimetype , int index = -1) ;
</span><del>-        /**
-         *
\brief Returns true if image data is present.
-        */
-
- bool Ok() const;
-        /**
-         *
\brief Finds the handler with the given name, and removes it. The handler
-is not deleted.
-         *
\param const wxString&
-        */
-
</del><ins>+ bool IsOk() const;
</ins><span class="cx"> static bool RemoveHandler(const
wxString& name ) ;
</span><del>-        /**
-         *
\brief
-         *
\param const wxString&
-         *
\param int
-        */
-
</del><span class="cx"> bool SaveFile(const
wxString& name , int type ) const;
</span><del>-        /**
-         *
\brief Saves an image in the named file.
-         *
\param const wxString&
-         *
\param const wxString&
-        */
-
</del><span class="cx"> bool SaveFile(const
wxString& name , const wxString& mimetype ) const;
</span><del>-        /**
-         *
\brief Saves an image in the named file. File type is determined from the
extension of the
-file name. Note that this function may fail if the extension is not recognized!
You
-can use one of the forms above to save images to files with non-standard
extensions.
-         *
\param const wxString&
-        */
-
</del><span class="cx"> bool SaveFile(const
wxString& name ) const;
</span><del>-        /**
-         *
\brief
-         *
\param wxOutputStream&
-         *
\param int
-        */
-
</del><span class="cx"> bool
SaveFile(wxOutputStream& stream , int type ) const;
</span><del>-        /**
-         *
\brief
-         *
\param wxOutputStream&
-         *
\param const wxString&
-        */
-
</del><span class="cx"> bool
SaveFile(wxOutputStream& stream , const wxString& mimetype ) const;
</span><del>-        /**
-         *
\brief Returns a mirrored copy of the image. The parameter
-indicates the orientation.
-         *
\param bool
-        */
-
</del><span class="cx"> wxImage Mirror(bool horizontally
= true) const;
</span><del>-        /**
-         *
\brief Replaces the colour specified by by the colour .
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><span class="cx"> void Replace(unsigned char r1 ,
unsigned char g1 , unsigned char b1 , unsigned char r2 , unsigned char g2 ,
unsigned char b2 ) ;
</span><del>-        /**
-         *
\brief Changes the size of the image in-place: after a call to this function,
the
-image will have the given width and height.
-
-Returns the (modified) image itself.
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> wxImage & Rescale(int width
, int height ) ;
</span><del>-        /**
-         *
\brief Rotates the image about the given point, by radians. Passing true
-to results in better image quality, but is slower. If the
-image has a mask, then the mask colour is used for the uncovered pixels in the
-rotated image background. Else, black (rgb 0, 0, 0) will be used.
-
-Returns the rotated image, leaving this image intact.
-         *
\param double
-         *
\param const wxPoint&
-         *
\param bool
-         *
\param wxPoint*
-        */
-
</del><span class="cx"> wxImage Rotate(double angle ,
const wxPoint& rotationCentre , bool interpolating = true, wxPoint*
offsetAfterRotation = NULL) ;
</span><del>-        /**
-         *
\brief Returns a copy of the image rotated 90 degrees in the direction
-indicated by .
-         *
\param bool
-        */
-
</del><span class="cx"> wxImage Rotate90(bool clockwise
= true) const;
</span><del>-        /**
-         *
\brief Returns a scaled version of the image. This is also useful for
-scaling bitmaps in general as the only other way to scale bitmaps
-is to blit a wxMemoryDC into another wxMemoryDC.
-
-It may be mentioned that the GTK port uses this function internally
-to scale bitmaps when using mapping modes in wxDC.
-
-Example:
-         *
\param int
-         *
\param int
-        */
-
</del><span class="cx"> wxImage Scale(int width , int
height ) const;
</span><del>-        /**
-         *
\brief This function is similar to and has similar
-restrictions. The pointer passed to it may however be in which case
-the function will allocate the alpha array internally -- this is useful to add
-alpha channel data to an image which doesn''t have any. If the pointer
is not
- , it must have one byte for each image pixel and be allocated with
- . wxImage takes ownership of the pointer and will free it.
-         *
\param unsigned char *
-        */
-
</del><span class="cx"> void SetAlpha(unsigned char *
alpha = NULL, bool static_data = false ) ;
</span><del>-        /**
-         *
\brief Sets the alpha value for the given pixel. This function should only be
called
-if the image has alpha channel data, use to
-check for this.
-         *
\param int
-         *
\param int
-         *
\param unsigned char
-        */
-
</del><span class="cx"> void SetAlpha(int x , int y ,
unsigned char alpha ) ;
</span><del>-        /**
-         *
\brief Sets the image data without performing checks. The data given must have
-the size (width*height*3) or results will be unexpected.
Don''t use this
-method if you aren''t sure you know what you are doing.
-
-The data must have been allocated with , {\large } with
- .
-
-After this call the pointer to the data is owned by the wxImage object,
-that will be responsible for deleting it.
-Do not pass to this function a pointer obtained through
- .
-         *
\param unsigned char*
-        */
-
</del><span class="cx"> void SetData(unsigned char* data
) ;
</span><del>-        /**
-         *
\brief Specifies whether there is a mask or not. The area of the mask is
determined by the current mask colour.
-         *
\param bool
-        */
-
</del><span class="cx"> void SetMask(bool hasMask =
true) ;
</span><del>-        /**
-         *
\brief Sets the mask colour for this image (and tells the image to use the
mask).
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><span class="cx"> void SetMaskColour(unsigned char
red , unsigned char green , unsigned char blue ) ;
</span><del>-        /**
-         *
\brief Sets image''s mask so that the pixels that have RGB value of
-in will be masked in the image. This is done by first finding an
-unused colour in the image, setting this colour as the mask colour and then
-using this colour to draw all pixels in the image who corresponding pixel
-in has given RGB value.
-         *
\param const wxImage&
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><span class="cx"> bool SetMaskFromImage(const
wxImage& mask , unsigned char mr , unsigned char mg , unsigned char mb )
;
</span><del>-        /**
-         *
\brief
-         *
\param const wxString&
-         *
\param const wxString&
-        */
-
</del><span class="cx"> void SetOption(const
wxString& name , const wxString& value ) ;
</span><del>-        /**
-         *
\brief Sets a user-defined option. The function is case-insensitive to .
-
-For example, when saving as a JPEG file, the option is
-used, which is a number between 0 and 100 (0 is terrible, 100 is very good).
-         *
\param const wxString&
-         *
\param int
-        */
-
</del><span class="cx"> void SetOption(const
wxString& name , int value ) ;
</span><del>-        /**
-         *
\brief Associates a palette with the image. The palette may be used when
converting
-wxImage to wxBitmap (MSW only at present) or in file save operations (none as
yet).
-         *
\param const wxPalette&
-        */
-
</del><span class="cx"> void SetPalette(const
wxPalette& palette ) ;
</span><del>-        /**
-         *
\brief Sets the pixel at the given coordinate. This routine performs
bounds-checks
-for the coordinate so it can be considered a safe way to manipulate the
-data, but in some cases this might be too slow so that the data will have to
-be set directly. In that case you will have to get access to the image data
-using the method.
-         *
\param int
-         *
\param int
-         *
\param unsigned char
-         *
\param unsigned char
-         *
\param unsigned char
-        */
-
</del><span class="cx"> void SetRGB(int x , int y ,
unsigned char red , unsigned char green , unsigned char blue ) ;
</span><ins>+ wxImage ShrinkBy( int xFactor , int yFactor ) const
;
+
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>
Reasonably Related Threads
- [724] trunk/wxruby2: Initial commit of HtmlWindow functionality
- [883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
- [904] branches/wxruby2/wxwidgets_282: Changes in Wx::Colour API 2.6 -> 2.8
- [950] branches/wxruby2/wxwidgets_282: Changes in GenericDirCtrl API 2.6->2.8, fix TreeItemId mapping, remove cruft
- [1056] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add missing param to InsertTool long version; uncomment some methods now
