Method function IGDIPlus.IGPGraphics.TranslateClip(Integer;Integer) : 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 TranslateClip( dx : Integer, dy : Integer ) : TGPGraphics;
C++ Builder:
TGPGraphics __fastcall TranslateClip( int dx, int dy );
Visual C++ (MFC):
TranslateClip( 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.SetClip(MakeRect(0, 0, 100, 50));
// Translate the clipping region.
AGraphics.TranslateClip(40, 30);
// 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;