Method function IGDIPlus.IGPGraphics.TranslateClipF(Single;Single) : TGPGraphics
From Mitov Wiki Doc
This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Class: IGPGraphics
Contents |
Syntax
Delphi:
function TranslateClipF( dx : Single, dy : Single ) : TGPGraphics;
C++ Builder:
TGPGraphics __fastcall TranslateClipF( float dx, float dy );
Visual C++ (MFC):
TranslateClipF( dx, dy );
Summary
Translates the clipping region of the TGPGraphics object.
Description
Call this method to translate the clipping region of the TGPGraphics object.
Example
The following example creates a Graphics object and sets its clipping region. The code translates the clipping region 100 units to the right and then fills a large rectangle that is clipped by the translated region.
var AGraphics : IGPGraphics; begin AGraphics := TGPGraphics.Create( ACanvas ); // Set the clipping region. AGraphics.SetClipF(MakeRectF(0.0, 0.0, 100.0, 50.0)); // Translate the clipping region. AGraphics.TranslateClipF(40.0, 30.0); // Fill an ellipse that is clipped by the translated clipping region. AGraphics.FillEllipse( TGPSolidBrush.Create( aclRed ), 20, 40, 100, 80); // Draw the outline of the clipping region (rectangle). AGraphics.DrawRectangle( TGPPen.Create( aclBlack, 2.0 ), 40, 30, 100, 50); end;