Only use raw bitmap if it is available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,7 +13,10 @@
|
|||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
#include "wx/tokenzr.h"
|
#include "wx/tokenzr.h"
|
||||||
|
|
||||||
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
#include "wx/rawbmp.h"
|
#include "wx/rawbmp.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "PlatWX.h"
|
#include "PlatWX.h"
|
||||||
@@ -345,6 +348,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
|
|||||||
ColourAllocated fill, int alphaFill,
|
ColourAllocated fill, int alphaFill,
|
||||||
ColourAllocated outline, int alphaOutline,
|
ColourAllocated outline, int alphaOutline,
|
||||||
int /*flags*/) {
|
int /*flags*/) {
|
||||||
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
int x, y;
|
int x, y;
|
||||||
wxRect r = wxRectFromPRectangle(rc);
|
wxRect r = wxRectFromPRectangle(rc);
|
||||||
wxBitmap bmp(r.width, r.height, 32);
|
wxBitmap bmp(r.width, r.height, 32);
|
||||||
@@ -402,6 +406,10 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
|
|||||||
|
|
||||||
// Draw the bitmap
|
// Draw the bitmap
|
||||||
hdc->DrawBitmap(bmp, r.x, r.y, true);
|
hdc->DrawBitmap(bmp, r.x, r.y, true);
|
||||||
|
|
||||||
|
#else
|
||||||
|
RectangleDraw(rc, outline, fill);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
||||||
|
@@ -13,7 +13,10 @@
|
|||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
#include "wx/tokenzr.h"
|
#include "wx/tokenzr.h"
|
||||||
|
|
||||||
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
#include "wx/rawbmp.h"
|
#include "wx/rawbmp.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "PlatWX.h"
|
#include "PlatWX.h"
|
||||||
@@ -345,6 +348,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
|
|||||||
ColourAllocated fill, int alphaFill,
|
ColourAllocated fill, int alphaFill,
|
||||||
ColourAllocated outline, int alphaOutline,
|
ColourAllocated outline, int alphaOutline,
|
||||||
int /*flags*/) {
|
int /*flags*/) {
|
||||||
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
int x, y;
|
int x, y;
|
||||||
wxRect r = wxRectFromPRectangle(rc);
|
wxRect r = wxRectFromPRectangle(rc);
|
||||||
wxBitmap bmp(r.width, r.height, 32);
|
wxBitmap bmp(r.width, r.height, 32);
|
||||||
@@ -402,6 +406,10 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize,
|
|||||||
|
|
||||||
// Draw the bitmap
|
// Draw the bitmap
|
||||||
hdc->DrawBitmap(bmp, r.x, r.y, true);
|
hdc->DrawBitmap(bmp, r.x, r.y, true);
|
||||||
|
|
||||||
|
#else
|
||||||
|
RectangleDraw(rc, outline, fill);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
|
||||||
|
Reference in New Issue
Block a user