PaintingContext
Base implementation that tracks clip bounds and scale factors while delegating drawing to a backend.
Definition
Namespace:Telerik.WinControls.Spreadsheet.UI
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public abstract class PaintingContext : IPaintingContext
Inheritance: objectPaintingContext
Derived Classes:
Implements:
Constructors
protected PaintingContext()
Properties
Gets or sets the clip bounds exposed to painting code.
public RectangleF ClipBounds { get; set; }
Implements:
Setting this property stores the bounds only; it does not change the graphics surface's clipping region. GDIPaintingContext does not populate it from the graphics clip, so its value remains empty until assigned.
Gets the scale factors recorded by the most recent scale operation, or 1,1 after a reset.
public SizeF ScaleFactor { get; protected set; }
Implements:
Methods
Draws the outline of the ellipse inscribed in the specified rectangle.
public abstract void DrawEllipse(RectangleF rectangle, Pen pen)
The bounds of the ellipse.
penPenThe pen used to draw the outline.
Implements:
Draws an image into a destination rectangle using the specified opacity.
public abstract void DrawImage(Image image, RectangleF rectangle, double opacity)
The image to draw.
rectangleRectangleFThe destination bounds.
opacitydoubleThe opacity passed to the drawing backend.
Implements:
Draws the outline of the specified rectangle.
public abstract void DrawRectangle(RectangleF rectangle, Pen pen)
The rectangle to outline.
penPenThe pen used to draw the outline.
Implements:
Fills the ellipse inscribed in the specified rectangle.
public abstract void FillEllipse(RectangleF rectanlge, Brush color)
Implements:
Fills the specified rectangle with a brush.
public abstract void FillRectangle(RectangleF rectanlge, Brush color)
Implements:
Inverts the rendered pixels within the specified rectangle.
public abstract void InvertRectangle(RectangleF rectangle)
The bounds of the pixels to invert.
Implements:
Resets the drawing surface transformation and records a scale factor of 1,1.
public void ResetTransformation()
Implements:
Restores the backend's drawing surface to its untransformed state.
protected abstract void ResetTransformationOverride()
Applies a scale to the drawing surface and records the supplied factors in ScaleFactor.