Table of Contents

Class PaintBuffer

Namespace
CADability
Assembly
CADability.dll

Remnant of the former GDI based display implementation. Originally this class held one bitmap per PaintBuffer.DrawingAspect (background, drawing, selection, active objects), accumulated the invalid rectangles of each aspect via the InvalidateXxx methods and composed the bitmaps into the window on the paint event, raising a repaint event for each aspect whose invalid area was not empty. Today only the PaintBuffer.DrawingAspect enumeration (used by the views to invalidate and to register paint handlers for a specific aspect) and the static rectangle helpers Union(Rectangle, Rectangle) and RectangleFromPoints(params Point[]) are still in use; the invalidation and scrolling methods have no effect on the display.

public class PaintBuffer
Inheritance
PaintBuffer
Inherited Members

Constructors

PaintBuffer()

public PaintBuffer()

Methods

ForceInvalidateAll()

public void ForceInvalidateAll()

HScroll(int)

public void HScroll(int Offset)

Parameters

Offset int

InvalidateActive(Rectangle)

public void InvalidateActive(Rectangle ext)

Parameters

ext Rectangle

InvalidateBackground(Rectangle)

public void InvalidateBackground(Rectangle ext)

Parameters

ext Rectangle

InvalidateDrawing(Rectangle)

public void InvalidateDrawing(Rectangle ext)

Parameters

ext Rectangle

InvalidateSelect(Rectangle)

public void InvalidateSelect(Rectangle ext)

Parameters

ext Rectangle

RectangleFromPoints(params Point[])

public static Rectangle RectangleFromPoints(params Point[] PointList)

Parameters

PointList Point[]

Returns

Rectangle

Union(Rectangle, Rectangle)

Returns the smallest rectangle which contains both given rectangles. An empty rectangle is ignored, i.e. the other rectangle is returned.

public static Rectangle Union(Rectangle r1, Rectangle r2)

Parameters

r1 Rectangle

First rectangle (pixel coordinates)

r2 Rectangle

Second rectangle (pixel coordinates)

Returns

Rectangle

The union of the two rectangles

VScroll(int)

public void VScroll(int Offset)

Parameters

Offset int