SparkDrawPart<T>
Provides shared rendering and hit-testing behavior for parts of a spark element.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Type Parameters:
T
The spark element rendered by this draw part.
Syntax:
public abstract class SparkDrawPart<T> : ISparkDrawPart where T : UISparkElement
Inheritance: objectSparkDrawPart<T>
Derived Classes:
Implements:
Constructors
Initializes a draw part for an element using the specified renderer.
public SparkDrawPart(T element, ISparkRenderer renderer)
The spark element whose visual content this part draws.
rendererISparkRendererThe renderer that supplies the drawing surface.
Properties
Gets the element.
public T Element { get; }
The element.
Gets the offset X.
public virtual float OffsetX { get; }
The offset X.
Gets the offset Y.
public virtual float OffsetY { get; }
The offset Y.
Gets the context object which will be painted as fill.
public object PaintContext { get; }
The renderer.
Implements:
Gets the renderer.
public ISparkRenderer Renderer { get; }
The renderer.
Implements:
Gets the view port offset X.
public virtual float ViewportOffsetX { get; }
The view port offset X.
Gets the view port offset Y.
public virtual float ViewportOffsetY { get; }
The view port offset Y.
Methods
Draws this instance.
public abstract void Draw()
Implements:
Gets the clipping bounds used when drawing this part.
protected virtual RectangleF GetAdjustedClipRect(Graphics g)
The graphics surface used for drawing.
Returns:The graphics surface's current clip bounds.
Determines whether the element is valid.
Raises the fill-paint event for path and fills it unless painting is canceled.
The exact Transparent value is skipped.
protected virtual void PaintFill(GraphicsPath path, Color fillColor)
The path to fill.
fillColorColorThe fill color.
Fills path using the element's background color.
Raises the stroke-paint event for path and draws the stroke unless painting is canceled.
The exact Transparent value and zero-width strokes are skipped.
protected virtual void PaintStroke(GraphicsPath path, Color borderColor, float width)
The path to stroke.
borderColorColorThe stroke color.
widthfloatThe stroke width.
Draws path using borderColor and the element's BorderWidth.
protected virtual void PaintStroke(GraphicsPath path, Color borderColor)
The path to stroke.
borderColorColorThe stroke color.
Draws path using the element's border color and width.
protected virtual void PaintStroke(GraphicsPath path)
The path to stroke.