X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bd3541321152b1f2997124d77246d43bf4de3fb..3eddc6bc00bcbdea23d52a8724f46ad56768f8b6:/wxPython/src/_graphics.i diff --git a/wxPython/src/_graphics.i b/wxPython/src/_graphics.i index b2fd3aa94e..8b667a7235 100644 --- a/wxPython/src/_graphics.i +++ b/wxPython/src/_graphics.i @@ -138,6 +138,8 @@ public : virtual void Copy( const wxGraphicsMatrix & ) {} virtual void Set(wxDouble , wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void Get(wxDouble*, wxDouble*, wxDouble*, + wxDouble*, wxDouble*, wxDouble*) {} virtual void Invert() {} virtual bool IsEqual( const wxGraphicsMatrix& t) const { return false; } virtual bool IsIdentity() const { return false; } @@ -215,6 +217,8 @@ public: virtual void Clip( wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void ResetClip() {} virtual void * GetNativeContext() { return NULL; } + virtual int GetLogicalFunction() const { return 0; } + virtual bool SetLogicalFunction(int ) {} virtual void Translate( wxDouble , wxDouble ) {} virtual void Scale( wxDouble , wxDouble ) {} virtual void Rotate( wxDouble ) {} @@ -251,9 +255,8 @@ public: virtual void StrokeLines( size_t , const wxPoint2DDouble *, const wxPoint2DDouble *) {} virtual void DrawLines( size_t , const wxPoint2DDouble *, int ) {} virtual void DrawRectangle( wxDouble , wxDouble , wxDouble , wxDouble ) {} - virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual void DrawEllipse( wxDouble , wxDouble , wxDouble , wxDouble ) {} - virtual void DrawRoundedRectangle( wxDouble wxDouble , wxDouble , wxDouble , wxDouble ) {} + virtual void DrawRoundedRectangle( wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ) {} virtual bool ShouldOffset() const { return false; } }; @@ -419,27 +422,19 @@ public : DocStr(wxGraphicsMatrix, "A wx.GraphicsMatrix is a native representation of an affine -matrix. The contents are specific an private to the respective +matrix. The contents are specific and private to the respective renderer. The only way to get a valid instance is via a CreateMatrix call on the graphics context or the renderer instance.", ""); class wxGraphicsMatrix : public wxGraphicsObject { public : - wxGraphicsMatrix(); +// wxGraphicsMatrix(); virtual ~wxGraphicsMatrix(); DocDeclStr( virtual void , Concat( const wxGraphicsMatrix& t ), "Concatenates the passed in matrix to the current matrix.", ""); -// %extend { -// DocStr(Copy, -// "Copy the passed in matrix to this one.", ""); -// void Copy( const wxGraphicsMatrix& t ) { -// *self = t; -// } -// } - DocDeclStr( virtual void , Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, @@ -447,6 +442,13 @@ public : "Sets the matrix to the specified values (default values are the identity matrix.)", ""); + + DocDeclAStr( + virtual void , Get(wxDouble* OUTPUT, wxDouble* OUTPUT, wxDouble* OUTPUT, + wxDouble* OUTPUT, wxDouble* OUTPUT, wxDouble* OUTPUT), + "Get(self) --> (a, b, c, d, tx, ty)", + "Gets the component values of the matrix and returns them as a tuple.", ""); + DocDeclStr( virtual void , Invert(), @@ -455,7 +457,8 @@ identity matrix.)", ""); DocDeclStr( virtual bool , IsEqual( const wxGraphicsMatrix& t) const, - "Returns ``True`` if the elements of the transformation matrix are equal", ""); + "Returns ``True`` if the elements of the transformation matrix are +equal", ""); DocDeclStr( @@ -504,7 +507,7 @@ way to make this value usable.", ""); class wxGraphicsPath : public wxGraphicsObject { public : - wxGraphicsPath(); +// wxGraphicsPath(); virtual ~wxGraphicsPath(); @@ -553,8 +556,8 @@ points and an end point", ""); "Adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle", ""); virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, - wxDouble startAngle, wxDouble endAngle, bool clockwise ); - void AddArc( const wxPoint2D& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise); + wxDouble startAngle, wxDouble endAngle, bool clockwise=true ); + void AddArc( const wxPoint2D& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise=true); DocDeclStr( @@ -575,8 +578,8 @@ point and an end point", ""); DocDeclStr( virtual void , AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) , - "Appends an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) -to (x2,y2), also a straight line from (current) to (x1,y1)", ""); + "Appends an arc to two tangents connecting (current) to (x1,y1) and +(x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)", ""); DocDeclStr( @@ -609,15 +612,16 @@ returned by GetNativePath is newly allocated each time).", ""); DocDeclStr( - wxRect2DDouble , GetBox() const, - "Gets the bounding box enclosing all points (possibly including control points)", ""); + wxRect2D , GetBox() const, + "Gets the bounding box enclosing all points (possibly including control +points)", ""); %nokwargs Contains; DocStr(Contains, "Returns ``True`` if the point is within the path.", ""); virtual bool Contains( wxDouble x, wxDouble y, int fillStyle = wxODDEVEN_RULE) const; - bool Contains( const wxPoint2DDouble& c, int fillStyle = wxODDEVEN_RULE) const; + bool Contains( const wxPoint2D& c, int fillStyle = wxODDEVEN_RULE) const; }; @@ -664,15 +668,17 @@ public: %newobject CreateFromNative; DocDeclStr( static wxGraphicsContext* , CreateFromNative( void * context ) , - "Creates a wx.GraphicsContext from a native context. This native context -must be eg a CGContextRef for Core Graphics, a Graphics pointer for -GDIPlus or a cairo_t pointer for Cairo.", ""); + "Creates a wx.GraphicsContext from a native context. This native +context must be eg a CGContextRef for Core Graphics, a Graphics +pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For +wxPython we still need a way to make this value usable.", ""); %newobject CreateFromNative; DocDeclStr( static wxGraphicsContext* , CreateFromNativeWindow( void * window ) , - "Creates a wx.GraphicsContext from a native window.", ""); + "Creates a wx.GraphicsContext from a native window. NOTE: For wxPython +we still need a way to make this value usable.", ""); @@ -703,8 +709,8 @@ with color c1 to (x2,y2) with color c2.", ""); virtual wxGraphicsBrush , CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, const wxColour &oColor, const wxColour &cColor), - "Creates a native brush, having a radial gradient originating at -point (xo,yc) with color oColour and ends on a circle around (xc,yc) with + "Creates a native brush, having a radial gradient originating at point +(xo,yc) with color oColour and ends on a circle around (xc,yc) with radius r and color cColour.", ""); @@ -724,12 +730,13 @@ values. The defaults result in an identity matrix.", ""); DocDeclStr( virtual void , PushState(), - "push the current state of the context, ie the transformation matrix on a stack", ""); + "Push the current state of the context, (ie the transformation matrix) +on a stack", ""); DocDeclStr( virtual void , PopState(), - "pops a stored state from the stack", ""); + "Pops a stored state from the stack", ""); DocDeclStrName( @@ -754,6 +761,16 @@ values. The defaults result in an identity matrix.", ""); pointer for GDIPlus and cairo_t pointer for cairo).", ""); + DocDeclStr( + virtual int , GetLogicalFunction() const, + "Returns the current logical function.", ""); + + + DocDeclStr( + virtual bool , SetLogicalFunction(int function) , + "Sets the current logical function, returns ``True`` if it supported", ""); + + DocDeclStr( virtual void , Translate( wxDouble dx , wxDouble dy ), "Translates the current transformation matrix.", ""); @@ -784,8 +801,7 @@ this context.", ""); DocDeclStr( virtual wxGraphicsMatrix , GetTransform() const, "Gets the current transformation matrix of this context.", ""); - - + DocStr(SetPen, "Sets the stroke pen", ""); @@ -922,8 +938,9 @@ and the current brush is used for filling.", ""); %extend { - DocStr(StrokeLineSegements, - "Stroke disconnected lines from begin to end points", ""); + DocAStr(StrokeLineSegements, + "StrokeLineSegments(self, List beginPoints, List endPoints)", + "Stroke disconnected lines from begin to end points", ""); void StrokeLineSegements(PyObject* beginPoints, PyObject* endPoints) { size_t c1, c2, count;