The RenderEx Class

The RendererEx Class

The RendererEx class provides rendering functionality and can be thought of as an extension of the Renderer class. It comprises static methods, most of which take a Renderer object for their first parameter.

InkSpaceToPixel

public static void InkSpaceToPixel (Renderer renderer, Graphics g, ref Rectangle rcRect)

This method is exactly like the Renderer class s InkSpaceToPixel method, except that it operates on a Rectangle object.

PixelToInkSpace

public static void PixelToInkSpace (Renderer renderer, Graphics g, ref Rectangle rcRect)

This method works like the Renderer class s PixelToInkSpace method, except that it operates on a Rectangle object.

DrawSelected

public static void DrawSelected (Renderer renderer, Graphics g, Strokes strokes) public static void DrawSelected (Renderer renderer, Graphics g, Stroke s)

These methods render ink strokes to appear outlined or with a halo style, as seen in InkOverlay s select mode and in Windows Journal. The halo style usually indicates that the ink is selected. These methods are useful in implementing a custom selection mode or real-time lasso selection.

DrawStrokeIds

public static void DrawStrokeIds (Graphics g, Font font, Ink ink) public static void DrawStrokeIds (Renderer renderer, Graphics g, Font font, Strokes strokes)

These methods draw each stroke ID value at the beginning point of each stroke in the specified Ink object or Strokes collection.

A Font object can be specified to alter the style of the rendering.

DrawBoundingBoxes

public static void DrawBoundingBoxes(Graphics g, Ink ink) public static void DrawBoundingBoxes (Renderer renderer, Graphics g, Strokes strokes, Pen pen, BoundingBoxMode mode)

These methods draw the bounding boxes of each stroke contained in the specified Ink object or Strokes collection. Use the BoundingBoxMode enumeration to specify the computation method of the bounding box.

A Pen object can be specified to alter the style of the rendering.

DrawPoints

public static void DrawPoints(Graphics g, Ink ink) public static void DrawPoints (Renderer renderer, Graphics g, Strokes strokes, Brush brush, StrokePointType type) public static void DrawPoints (Renderer renderer, Graphics g, Stroke stroke, Brush brush, StrokePointType type)

These methods draw the points making up each specified stroke. The type of the points to use for display is specified with a StrokePointType enumeration:

public enum StrokePointType { Polyline, Bezier, FlattenedBezier }

Specify a Brush object to alter the color of the rendering.

DrawIntersections

public static void DrawIntersections(Graphics g, Ink ink) public static void DrawIntersections (Renderer renderer, Graphics g, Strokes strokes, Pen pen, StrokeIntersectionType type)

These methods draw the intersections of the strokes specified in the Ink object or Strokes collection. The type of intersection is specified with the StrokeIntersectionType enumeration:

public enum StrokeIntersectionType { Self, Stroke, BoundingBox }

A Pen object can be specified to alter the style of the rendering.

DrawCusps

public static void DrawCusps(Graphics g, Ink ink) public static void DrawCusps (Renderer renderer, Graphics g, Strokes strokes, Pen pen, StrokeCuspType type) public static void DrawCusps (Renderer renderer, Graphics g, Stroke stroke, Pen pen, StrokeCuspType type)

These methods draw the cusps computed in each specified stroke. The type of cusp is specified with the StrokeCuspType enumeration:

public enum StrokeCuspType { Bezier, Polyline }

A Pen object can be specified to alter the style of the rendering.



Building Tablet PC Applications
Building Tablet PC Applications (Pro-Developer)
ISBN: 0735617236
EAN: 2147483647
Year: 2001
Pages: 73

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net