wxShapeFramework
1.13.0 beta
|
Class acts as a wrapper for given DC class and provides modified drawing functions cooperating with the shape canvas able to draw scaled graphics. All drawing operations performed by the shapes should be done via this class otherwise the global scalling capabilities provided by the shape canvas wont be available. More...
#include <ScaledDC.h>
Public Member Functions | |
wxSFScaledDC (wxWindowDC *target, double scale) | |
virtual | ~wxSFScaledDC () |
void | SetScale (double scale) |
Set the global graphics scale. | |
void | PrepareGC () |
Prepare wxGraphicsContext similiarly to PrepareDC() function. | |
virtual void | CalcBoundingBox (wxCoord x, wxCoord y) |
virtual bool | CanDrawBitmap () const |
virtual bool | CanGetTextExtent () const |
virtual void | Clear () |
virtual void | ComputeScaleAndOrigin () |
virtual void | DrawObject (wxDrawObject *drawobject) |
virtual void | EndDoc () |
virtual void | EndPage () |
virtual const wxBrush & | GetBackground () const |
virtual int | GetBackgroundMode () const |
virtual const wxBrush & | GetBrush () const |
virtual wxCoord | GetCharHeight () const |
virtual wxCoord | GetCharWidth () const |
virtual int | GetDepth () const |
virtual const wxFont & | GetFont () const |
virtual wxLayoutDirection | GetLayoutDirection () const |
virtual int | GetLogicalFunction () const |
virtual void | GetLogicalScale (double *x, double *y) |
virtual int | GetMapMode () const |
virtual void | GetMultiLineTextExtent (const wxString &string, wxCoord *width, wxCoord *height, wxCoord *heightLine=NULL, wxFont *font=NULL) const |
virtual wxSize | GetPPI () const |
virtual const wxPen & | GetPen () const |
virtual wxBitmap | GetSelectedBitmap () const |
virtual const wxColour & | GetTextBackground () const |
virtual const wxColour & | GetTextForeground () const |
virtual void | GetUserScale (double *x, double *y) const |
virtual bool | IsOk () const |
virtual bool | Ok () const |
virtual void | SetAxisOrientation (bool xLeftRight, bool yBottomUp) |
virtual void | SetBackground (const wxBrush &brush) |
virtual void | SetBackgroundMode (int mode) |
virtual void | SetBrush (const wxBrush &brush) |
virtual void | SetDeviceOrigin (wxCoord x, wxCoord y) |
virtual void | SetFont (const wxFont &font) |
virtual void | SetLayoutDirection (wxLayoutDirection dir) |
virtual void | SetLogicalFunction (int function) |
virtual void | SetLogicalOrigin (wxCoord x, wxCoord y) |
virtual void | SetLogicalScale (double x, double y) |
virtual void | SetMapMode (int mode) |
virtual void | SetPalette (const wxPalette &palette) |
virtual void | SetPen (const wxPen &pen) |
virtual void | SetTextBackground (const wxColour &colour) |
virtual void | SetTextForeground (const wxColour &colour) |
virtual void | SetUserScale (double x, double y) |
virtual bool | StartDoc (const wxString &message) |
virtual void | StartPage () |
Static Public Member Functions | |
static void | EnableGC (bool enab) |
Enable/Disable usage of wxGraphicsContext. | |
Protected Member Functions | |
wxCoord | Scale (wxCoord val) |
Scale given value. | |
void | InitGC () |
Initialize wxGraphicsContext. | |
void | UninitGC () |
Uninitialize wxGraphicsContext. | |
virtual bool | DoBlit (wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop=wxCOPY, bool useMask=false, wxCoord xsrcMask=wxDefaultCoord, wxCoord ysrcMask=wxDefaultCoord) |
virtual void | DoCrossHair (wxCoord x, wxCoord y) |
virtual void | DoDrawArc (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc) |
virtual void | DoDrawBitmap (const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask=false) |
virtual void | DoDrawCheckMark (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
virtual void | DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
virtual void | DoDrawEllipticArc (wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea) |
virtual void | DoDrawIcon (const wxIcon &icon, wxCoord x, wxCoord y) |
virtual void | DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) |
virtual void | DoDrawLines (int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset) |
virtual void | DoDrawPoint (wxCoord x, wxCoord y) |
virtual void | DoDrawPolyPolygon (int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle) |
virtual void | DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle=wxODDEVEN_RULE) |
virtual void | DoDrawRectangle (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
virtual void | DoDrawRotatedText (const wxString &text, wxCoord x, wxCoord y, double angle) |
virtual void | DoDrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius) |
virtual void | DoDrawSpline (wxList *points) |
virtual void | DoDrawText (const wxString &text, wxCoord x, wxCoord y) |
virtual bool | DoFloodFill (wxCoord x, wxCoord y, const wxColour &col, int style=wxFLOOD_SURFACE) |
virtual wxBitmap | DoGetAsBitmap (const wxRect *subrect) const |
virtual void | DoGetClippingBox (wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const |
virtual void | DoGetClippingRegion (wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) |
virtual void | DoGetDeviceOrigin (wxCoord *x, wxCoord *y) const |
virtual void | DoGetLogicalOrigin (wxCoord *x, wxCoord *y) const |
virtual bool | DoGetPartialTextExtents (const wxString &text, wxArrayInt &widths) const |
virtual bool | DoGetPixel (wxCoord x, wxCoord y, wxColour *col) const |
virtual void | DoGetSize (int *width, int *height) const |
virtual void | DoGetSizeMM (int *width, int *height) const |
virtual void | DoGetTextExtent (const wxString &string, wxCoord *x, wxCoord *y, wxCoord *descent=NULL, wxCoord *externalLeading=NULL, wxFont *theFont=NULL) const |
virtual void | DoGradientFillConcentric (const wxRect &rect, const wxColour &initialColour, const wxColour &destColour, const wxPoint &circleCenter) |
virtual void | DoGradientFillLinear (const wxRect &rect, const wxColour &initialColour, const wxColour &destColour, wxDirection nDirection=wxEAST) |
virtual void | DoSetClippingRegion (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
virtual void | DoSetClippingRegionAsRegion (const wxRegion ®ion) |
Protected Attributes | |
double | m_nScale |
Global graphics scale. | |
wxWindowDC * | m_pTargetDC |
Pointer to wrapped device context. | |
Static Protected Attributes | |
static bool | m_fEnableGC |
wxGraphicsContext usage flag. |
Class acts as a wrapper for given DC class and provides modified drawing functions cooperating with the shape canvas able to draw scaled graphics. All drawing operations performed by the shapes should be done via this class otherwise the global scalling capabilities provided by the shape canvas wont be available.
wxSFScaledDC::wxSFScaledDC | ( | wxWindowDC * | target, |
double | scale | ||
) |
virtual wxSFScaledDC::~wxSFScaledDC | ( | ) | [virtual] |
virtual void wxSFScaledDC::CalcBoundingBox | ( | wxCoord | x, |
wxCoord | y | ||
) | [virtual] |
virtual bool wxSFScaledDC::CanDrawBitmap | ( | ) | const [virtual] |
virtual bool wxSFScaledDC::CanGetTextExtent | ( | ) | const [virtual] |
virtual void wxSFScaledDC::Clear | ( | ) | [virtual] |
virtual void wxSFScaledDC::ComputeScaleAndOrigin | ( | ) | [virtual] |
virtual bool wxSFScaledDC::DoBlit | ( | wxCoord | xdest, |
wxCoord | ydest, | ||
wxCoord | width, | ||
wxCoord | height, | ||
wxDC * | source, | ||
wxCoord | xsrc, | ||
wxCoord | ysrc, | ||
int | rop = wxCOPY , |
||
bool | useMask = false , |
||
wxCoord | xsrcMask = wxDefaultCoord , |
||
wxCoord | ysrcMask = wxDefaultCoord |
||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoCrossHair | ( | wxCoord | x, |
wxCoord | y | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawArc | ( | wxCoord | x1, |
wxCoord | y1, | ||
wxCoord | x2, | ||
wxCoord | y2, | ||
wxCoord | xc, | ||
wxCoord | yc | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawBitmap | ( | const wxBitmap & | bmp, |
wxCoord | x, | ||
wxCoord | y, | ||
bool | useMask = false |
||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawCheckMark | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawEllipse | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawEllipticArc | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | w, | ||
wxCoord | h, | ||
double | sa, | ||
double | ea | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawIcon | ( | const wxIcon & | icon, |
wxCoord | x, | ||
wxCoord | y | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawLine | ( | wxCoord | x1, |
wxCoord | y1, | ||
wxCoord | x2, | ||
wxCoord | y2 | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawLines | ( | int | n, |
wxPoint | points[], | ||
wxCoord | xoffset, | ||
wxCoord | yoffset | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawPoint | ( | wxCoord | x, |
wxCoord | y | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawPolygon | ( | int | n, |
wxPoint | points[], | ||
wxCoord | xoffset, | ||
wxCoord | yoffset, | ||
int | fillStyle = wxODDEVEN_RULE |
||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawPolyPolygon | ( | int | n, |
int | count[], | ||
wxPoint | points[], | ||
wxCoord | xoffset, | ||
wxCoord | yoffset, | ||
int | fillStyle | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawRectangle | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawRotatedText | ( | const wxString & | text, |
wxCoord | x, | ||
wxCoord | y, | ||
double | angle | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawRoundedRectangle | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height, | ||
double | radius | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawSpline | ( | wxList * | points | ) | [protected, virtual] |
virtual void wxSFScaledDC::DoDrawText | ( | const wxString & | text, |
wxCoord | x, | ||
wxCoord | y | ||
) | [protected, virtual] |
virtual bool wxSFScaledDC::DoFloodFill | ( | wxCoord | x, |
wxCoord | y, | ||
const wxColour & | col, | ||
int | style = wxFLOOD_SURFACE |
||
) | [protected, virtual] |
virtual wxBitmap wxSFScaledDC::DoGetAsBitmap | ( | const wxRect * | subrect | ) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetClippingBox | ( | wxCoord * | x, |
wxCoord * | y, | ||
wxCoord * | w, | ||
wxCoord * | h | ||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetClippingRegion | ( | wxCoord * | x, |
wxCoord * | y, | ||
wxCoord * | w, | ||
wxCoord * | h | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoGetDeviceOrigin | ( | wxCoord * | x, |
wxCoord * | y | ||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetLogicalOrigin | ( | wxCoord * | x, |
wxCoord * | y | ||
) | const [protected, virtual] |
virtual bool wxSFScaledDC::DoGetPartialTextExtents | ( | const wxString & | text, |
wxArrayInt & | widths | ||
) | const [protected, virtual] |
virtual bool wxSFScaledDC::DoGetPixel | ( | wxCoord | x, |
wxCoord | y, | ||
wxColour * | col | ||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetSize | ( | int * | width, |
int * | height | ||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetSizeMM | ( | int * | width, |
int * | height | ||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGetTextExtent | ( | const wxString & | string, |
wxCoord * | x, | ||
wxCoord * | y, | ||
wxCoord * | descent = NULL , |
||
wxCoord * | externalLeading = NULL , |
||
wxFont * | theFont = NULL |
||
) | const [protected, virtual] |
virtual void wxSFScaledDC::DoGradientFillConcentric | ( | const wxRect & | rect, |
const wxColour & | initialColour, | ||
const wxColour & | destColour, | ||
const wxPoint & | circleCenter | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoGradientFillLinear | ( | const wxRect & | rect, |
const wxColour & | initialColour, | ||
const wxColour & | destColour, | ||
wxDirection | nDirection = wxEAST |
||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoSetClippingRegion | ( | wxCoord | x, |
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height | ||
) | [protected, virtual] |
virtual void wxSFScaledDC::DoSetClippingRegionAsRegion | ( | const wxRegion & | region | ) | [protected, virtual] |
virtual void wxSFScaledDC::DrawObject | ( | wxDrawObject * | drawobject | ) | [virtual] |
static void wxSFScaledDC::EnableGC | ( | bool | enab | ) | [inline, static] |
Enable/Disable usage of wxGraphicsContext.
enab | Set to TRUE if the wxGraphicsContext should be used for drawing |
virtual void wxSFScaledDC::EndDoc | ( | ) | [virtual] |
virtual void wxSFScaledDC::EndPage | ( | ) | [virtual] |
virtual const wxBrush& wxSFScaledDC::GetBackground | ( | ) | const [virtual] |
virtual int wxSFScaledDC::GetBackgroundMode | ( | ) | const [virtual] |
virtual const wxBrush& wxSFScaledDC::GetBrush | ( | ) | const [virtual] |
virtual wxCoord wxSFScaledDC::GetCharHeight | ( | ) | const [virtual] |
virtual wxCoord wxSFScaledDC::GetCharWidth | ( | ) | const [virtual] |
virtual int wxSFScaledDC::GetDepth | ( | ) | const [virtual] |
virtual const wxFont& wxSFScaledDC::GetFont | ( | ) | const [virtual] |
virtual wxLayoutDirection wxSFScaledDC::GetLayoutDirection | ( | ) | const [virtual] |
virtual int wxSFScaledDC::GetLogicalFunction | ( | ) | const [virtual] |
virtual void wxSFScaledDC::GetLogicalScale | ( | double * | x, |
double * | y | ||
) | [virtual] |
virtual int wxSFScaledDC::GetMapMode | ( | ) | const [virtual] |
virtual void wxSFScaledDC::GetMultiLineTextExtent | ( | const wxString & | string, |
wxCoord * | width, | ||
wxCoord * | height, | ||
wxCoord * | heightLine = NULL , |
||
wxFont * | font = NULL |
||
) | const [virtual] |
virtual const wxPen& wxSFScaledDC::GetPen | ( | ) | const [virtual] |
virtual wxSize wxSFScaledDC::GetPPI | ( | ) | const [virtual] |
virtual wxBitmap wxSFScaledDC::GetSelectedBitmap | ( | ) | const [virtual] |
virtual const wxColour& wxSFScaledDC::GetTextBackground | ( | ) | const [virtual] |
virtual const wxColour& wxSFScaledDC::GetTextForeground | ( | ) | const [virtual] |
virtual void wxSFScaledDC::GetUserScale | ( | double * | x, |
double * | y | ||
) | const [virtual] |
void wxSFScaledDC::InitGC | ( | ) | [protected] |
Initialize wxGraphicsContext.
virtual bool wxSFScaledDC::IsOk | ( | ) | const [virtual] |
virtual bool wxSFScaledDC::Ok | ( | ) | const [virtual] |
void wxSFScaledDC::PrepareGC | ( | ) |
Prepare wxGraphicsContext similiarly to PrepareDC() function.
wxCoord wxSFScaledDC::Scale | ( | wxCoord | val | ) | [inline, protected] |
Scale given value.
val | Value to scale |
virtual void wxSFScaledDC::SetAxisOrientation | ( | bool | xLeftRight, |
bool | yBottomUp | ||
) | [virtual] |
virtual void wxSFScaledDC::SetBackground | ( | const wxBrush & | brush | ) | [virtual] |
virtual void wxSFScaledDC::SetBackgroundMode | ( | int | mode | ) | [virtual] |
virtual void wxSFScaledDC::SetBrush | ( | const wxBrush & | brush | ) | [virtual] |
virtual void wxSFScaledDC::SetDeviceOrigin | ( | wxCoord | x, |
wxCoord | y | ||
) | [virtual] |
virtual void wxSFScaledDC::SetFont | ( | const wxFont & | font | ) | [virtual] |
virtual void wxSFScaledDC::SetLayoutDirection | ( | wxLayoutDirection | dir | ) | [virtual] |
virtual void wxSFScaledDC::SetLogicalFunction | ( | int | function | ) | [virtual] |
virtual void wxSFScaledDC::SetLogicalOrigin | ( | wxCoord | x, |
wxCoord | y | ||
) | [virtual] |
virtual void wxSFScaledDC::SetLogicalScale | ( | double | x, |
double | y | ||
) | [virtual] |
virtual void wxSFScaledDC::SetMapMode | ( | int | mode | ) | [virtual] |
virtual void wxSFScaledDC::SetPalette | ( | const wxPalette & | palette | ) | [virtual] |
virtual void wxSFScaledDC::SetPen | ( | const wxPen & | pen | ) | [virtual] |
void wxSFScaledDC::SetScale | ( | double | scale | ) | [inline] |
Set the global graphics scale.
scale | Scale |
virtual void wxSFScaledDC::SetTextBackground | ( | const wxColour & | colour | ) | [virtual] |
virtual void wxSFScaledDC::SetTextForeground | ( | const wxColour & | colour | ) | [virtual] |
virtual void wxSFScaledDC::SetUserScale | ( | double | x, |
double | y | ||
) | [virtual] |
virtual bool wxSFScaledDC::StartDoc | ( | const wxString & | message | ) | [virtual] |
virtual void wxSFScaledDC::StartPage | ( | ) | [virtual] |
void wxSFScaledDC::UninitGC | ( | ) | [protected] |
Uninitialize wxGraphicsContext.
bool wxSFScaledDC::m_fEnableGC [static, protected] |
wxGraphicsContext usage flag.
double wxSFScaledDC::m_nScale [protected] |
Global graphics scale.
wxWindowDC* wxSFScaledDC::m_pTargetDC [protected] |
Pointer to wrapped device context.