C# Class LongoMatch.Drawing.Canvas

A canvas stores ICanvasObject's and draws them.
Inheritance: ICanvas
Afficher le fichier Open project: GNOME/longomatch

Protected Properties

Свойство Type Description
tk IDrawingToolkit
widget IWidget

Méthodes publiques

Méthode Description
AddObject ( ICanvasObject co ) : void

Adds a new object to the canvas and a listener to its redraw event.

Canvas ( IWidget widget ) : System
Dispose ( ) : void
Draw ( IContext context, Area area ) : void

Draws the canvas objects the specified context and area. Object are drawn in the following order: 1) Regular objects 2) Selected objects 3) Highlithed objects

RemoveObject ( ICanvasObject co ) : void

Removes and object from the canvas.

Méthodes protégées

Méthode Description
Begin ( IContext context ) : void

Must be called before any drawing operation is performed to apply transformation, scalling and clipping.

ClearObjects ( ) : void

Removes all the objects from the canvas.

Dispose ( bool disposing ) : void
End ( ) : void

Must be called after drawing operations to restore the context

HandleRedrawEvent ( ICanvasObject co, Area area ) : void
HandleSizeChangedEvent ( ) : void
ToUserCoords ( Point p ) : Point

Converts a point to the original position removing the applied tanslation and invering the scale.

Method Details

AddObject() public méthode

Adds a new object to the canvas and a listener to its redraw event.
public AddObject ( ICanvasObject co ) : void
co ICanvasObject The object to add.
Résultat void

Begin() protected méthode

Must be called before any drawing operation is performed to apply transformation, scalling and clipping.
protected Begin ( IContext context ) : void
context IContext Context to draw
Résultat void

Canvas() public méthode

public Canvas ( IWidget widget ) : System
widget IWidget
Résultat System

ClearObjects() protected méthode

Removes all the objects from the canvas.
protected ClearObjects ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Draw() public méthode

Draws the canvas objects the specified context and area. Object are drawn in the following order: 1) Regular objects 2) Selected objects 3) Highlithed objects
public Draw ( IContext context, Area area ) : void
context IContext The context where the canvas is drawn.
area LongoMatch.Core.Common.Area The affected area.
Résultat void

End() protected méthode

Must be called after drawing operations to restore the context
protected End ( ) : void
Résultat void

HandleRedrawEvent() protected méthode

protected HandleRedrawEvent ( ICanvasObject co, Area area ) : void
co ICanvasObject
area LongoMatch.Core.Common.Area
Résultat void

HandleSizeChangedEvent() protected méthode

protected HandleSizeChangedEvent ( ) : void
Résultat void

RemoveObject() public méthode

Removes and object from the canvas.
public RemoveObject ( ICanvasObject co ) : void
co ICanvasObject The object to remove.
Résultat void

ToUserCoords() protected méthode

Converts a point to the original position removing the applied tanslation and invering the scale.
protected ToUserCoords ( Point p ) : Point
p Point The point to convert.
Résultat Point

Property Details

tk protected_oe property

protected IDrawingToolkit tk
Résultat IDrawingToolkit

widget protected_oe property

protected IWidget widget
Résultat IWidget