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
Offsetint
InvalidateActive(Rectangle)
public void InvalidateActive(Rectangle ext)
Parameters
extRectangle
InvalidateBackground(Rectangle)
public void InvalidateBackground(Rectangle ext)
Parameters
extRectangle
InvalidateDrawing(Rectangle)
public void InvalidateDrawing(Rectangle ext)
Parameters
extRectangle
InvalidateSelect(Rectangle)
public void InvalidateSelect(Rectangle ext)
Parameters
extRectangle
RectangleFromPoints(params Point[])
public static Rectangle RectangleFromPoints(params Point[] PointList)
Parameters
PointListPoint[]
Returns
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
Returns
- Rectangle
The union of the two rectangles
VScroll(int)
public void VScroll(int Offset)
Parameters
Offsetint