DrawBitmapXY Migration

Hello everybody,

I've got a legacy code that I think was written in wxPython 2.4. This
code uses undocumented DrawBitmapXY function that is gone in newer
versions, but Migration Guide doesn't mention this change. What is the
proper way to port these calls?

Thanks.

anatoly techtonik wrote:

Hello everybody,

I've got a legacy code that I think was written in wxPython 2.4. This
code uses undocumented DrawBitmapXY function that is gone in newer
versions, but Migration Guide doesn't mention this change. What is the
proper way to port these calls?

dc.DrawBitmapPoint(Bitmap, Point, useMask=False)

or can just use

dc.DrawBitmap(Bitmap, x, y, useMask=False),

and pass in x and y separately.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Thanks for reply. Second variant worked ok - I didn't even change any
parameters - just removed XY from function names. However, it bothers
me a little that this information is not in Migration Guide. It seems
that there were many XY function and having a list of them that is
accessible by search engines would save me some hours.

···

On Oct 4, 11:37 pm, Christopher Barker <Chris.Bar...@noaa.gov> wrote:

> I've got a legacy code that I think was written in wxPython 2.4. This
> code uses undocumented DrawBitmapXY function that is gone in newer
> versions, but Migration Guide doesn't mention this change. What is the
> proper way to port these calls?

dc.DrawBitmapPoint(Bitmap, Point, useMask=False)

or can just use

dc.DrawBitmap(Bitmap, x, y, useMask=False),

and pass in x and y separately.

--
WBR,
anatoly t.

IIRC the XY versions of the DC methods were experimental and only existed for one release. Most people didn't like the change and so it was removed and reverted back to the old API implementation.

···

On 10/6/09 5:43 AM, anatoly techtonik wrote:

On Oct 4, 11:37 pm, Christopher Barker<Chris.Bar...@noaa.gov> wrote:

I've got a legacy code that I think was written in wxPython 2.4. This
code uses undocumented DrawBitmapXY function that is gone in newer
versions, but Migration Guide doesn't mention this change. What is the
proper way to port these calls?

dc.DrawBitmapPoint(Bitmap, Point, useMask=False)

or can just use

dc.DrawBitmap(Bitmap, x, y, useMask=False),

and pass in x and y separately.

Thanks for reply. Second variant worked ok - I didn't even change any
parameters - just removed XY from function names. However, it bothers
me a little that this information is not in Migration Guide. It seems
that there were many XY function and having a list of them that is
accessible by search engines would save me some hours.

--
Robin Dunn
Software Craftsman

To finish this off - here is a list other XY functions from that
experimental API. To port old code that uses these functions - just
strip XY from their names.

BlitXY
CrossHairXY
DrawArcXY
DrawBitmapXY
DrawCheckMarkXY
DrawCircleXY
DrawEllipseXY
DrawEllipticArcXY
DrawIconXY
DrawLineXY
DrawPointXY
DrawRectangleXY
DrawRotatedTextXY
DrawRoundedRectangleXY
DrawTextXY
FloodFillXY
GetPixelXY
SetClippingRegionXY