|
Type Summary
Background_Mode_Type |
Canvas_State_Type derived from Integer |
Canvas_Type derived from Information_Canvas_Type |
| New Operations: |
Arc,
Background_Color,
Background_Color,
Background_Mode,
Background_Mode,
Beziers,
BitBlt,
Chord,
Clipping_Area,
Create_Compatible_Bitmap,
Device_To_Logical,
Device_To_Logical,
Device_To_Logical,
Draw_Direction,
Ellipse,
Exclude_Clipping_Area,
Fill_Rectangle,
Fill_Rectangle,
Frame_Rectangle,
Horizontal_Text_Alignment,
Horizontal_Text_Alignment,
Include_Clipping_Area,
Inside_Clipping_Area,
Inside_Clipping_Area,
Invert_Rectangle,
Line,
Lines,
Logical_To_Device,
Logical_To_Device,
Logical_To_Device,
Map_Mode,
Map_Mode,
Offset_Viewport_Origin,
Offset_Window_Origin,
Paint_Bitmap,
Paint_Icon,
Pie,
Point,
Point,
Point_Size,
Polygon,
Put,
Put,
Rectangle,
Rectangle_3D,
Rectangle_3D,
Rounded_Rectangle,
Scale_Viewport_Extents,
Scale_Window_Extents,
Select_Object,
Set_Mix_Mode,
StretchBlt,
Text_Color,
Text_Color,
Text_Output_Size,
Vertical_Text_Alignment,
Vertical_Text_Alignment,
Viewport_Extents,
Viewport_Extents,
Viewport_Origin,
Viewport_Origin,
Window_Extents,
Window_Extents,
Window_Origin,
Window_Origin,
X_Pixels_Per_Inch,
Y_Pixels_Per_Inch
|
| Inherited Operations: |
Capture,
Finalize,
Handle,
Handle,
Initialize,
Load_State,
Release,
Save_State
|
Draw_Direction_Type |
Horizontal_Alignment_Type |
Information_Canvas_Type derived from Limited_Controlled |
| Overridden Operations: |
Finalize,
Initialize
|
| New Operations: |
Capture,
Handle,
Handle,
Load_State,
Release,
Save_State
|
Memory_Canvas_Type derived from Canvas_Type |
| Overridden Operations: |
Finalize
|
| New Operations: |
Create_Memory_Canvas
|
| Inherited Operations: |
Arc,
Background_Color,
Background_Color,
Background_Mode,
Background_Mode,
Beziers,
BitBlt,
Capture,
Chord,
Clipping_Area,
Create_Compatible_Bitmap,
Device_To_Logical,
Device_To_Logical,
Device_To_Logical,
Draw_Direction,
Ellipse,
Exclude_Clipping_Area,
Fill_Rectangle,
Fill_Rectangle,
Frame_Rectangle,
Handle,
Handle,
Horizontal_Text_Alignment,
Horizontal_Text_Alignment,
Include_Clipping_Area,
Initialize,
Inside_Clipping_Area,
Inside_Clipping_Area,
Invert_Rectangle,
Line,
Lines,
Load_State,
Logical_To_Device,
Logical_To_Device,
Logical_To_Device,
Map_Mode,
Map_Mode,
Offset_Viewport_Origin,
Offset_Window_Origin,
Paint_Bitmap,
Paint_Icon,
Pie,
Point,
Point,
Point_Size,
Polygon,
Put,
Put,
Rectangle,
Rectangle_3D,
Rectangle_3D,
Release,
Rounded_Rectangle,
Save_State,
Scale_Viewport_Extents,
Scale_Window_Extents,
Select_Object,
Set_Mix_Mode,
StretchBlt,
Text_Color,
Text_Color,
Text_Output_Size,
Vertical_Text_Alignment,
Vertical_Text_Alignment,
Viewport_Extents,
Viewport_Extents,
Viewport_Origin,
Viewport_Origin,
Window_Extents,
Window_Extents,
Window_Origin,
Window_Origin,
X_Pixels_Per_Inch,
Y_Pixels_Per_Inch
|
Printer_Canvas_Type derived from Canvas_Type |
| New Operations: |
Abort_Document,
End_Document,
End_Page,
Start_Document,
Start_Page
|
| Inherited Operations: |
Arc,
Background_Color,
Background_Color,
Background_Mode,
Background_Mode,
Beziers,
BitBlt,
Capture,
Chord,
Clipping_Area,
Create_Compatible_Bitmap,
Device_To_Logical,
Device_To_Logical,
Device_To_Logical,
Draw_Direction,
Ellipse,
Exclude_Clipping_Area,
Fill_Rectangle,
Fill_Rectangle,
Finalize,
Frame_Rectangle,
Handle,
Handle,
Horizontal_Text_Alignment,
Horizontal_Text_Alignment,
Include_Clipping_Area,
Initialize,
Inside_Clipping_Area,
Inside_Clipping_Area,
Invert_Rectangle,
Line,
Lines,
Load_State,
Logical_To_Device,
Logical_To_Device,
Logical_To_Device,
Map_Mode,
Map_Mode,
Offset_Viewport_Origin,
Offset_Window_Origin,
Paint_Bitmap,
Paint_Icon,
Pie,
Point,
Point,
Point_Size,
Polygon,
Put,
Put,
Rectangle,
Rectangle_3D,
Rectangle_3D,
Release,
Rounded_Rectangle,
Save_State,
Scale_Viewport_Extents,
Scale_Window_Extents,
Select_Object,
Set_Mix_Mode,
StretchBlt,
Text_Color,
Text_Color,
Text_Output_Size,
Vertical_Text_Alignment,
Vertical_Text_Alignment,
Viewport_Extents,
Viewport_Extents,
Viewport_Origin,
Viewport_Origin,
Window_Extents,
Window_Extents,
Window_Origin,
Window_Origin,
X_Pixels_Per_Inch,
Y_Pixels_Per_Inch
|
ThreeD_Type |
Vertical_Alignment_Type |
|
Constants and Named Numbers
|
Other Items:
|
type Information_Canvas_Type is
new Ada.Finalization.Limited_Controlled with private;
|
|
A canvas that can not be drawn upon, but can be used to query
capabilities using package GWindows.Drawing.Capabilities
|
|
|
|
|
|
|
procedure Handle (Canvas : in out Information_Canvas_Type;
HDC : in GWindows.Types.Handle);
|
|
Setting the handle should only be done with full understanding
of the GWindows framework. If a handle is set on a new Canvas
object, the previous state will not be stored or restored, nor
will the device context be released unless a previous caputre
was performed.
|
|
|
|
|
type Canvas_Type is new Information_Canvas_Type with private;
|
Canvas_Type
A drawable canvas on a Window
Drawing on canvas of a window will be erased under many conditions
code should be added to redraw the canvas in the On_Paint event or
use a Memory_Canvas and bitmap to store the image and restore
from it later in the On_Paint
|
|
|
|
|
|
procedure Rectangle (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom : in Integer);
|
|
Draw a rectangle with current pen and fill with current brush
Excludes bottom and right edge
|
|
|
procedure Rectangle_3D
(Canvas : in out Canvas_Type;
Left, Top, Right, Bottom : in Integer;
Direction : in ThreeD_Type := Raised;
Thickness : in Integer := 1);
|
|
Draw a 3D rectangle using COLOR_BTNHILIGHT for top left side
and COLOR_BTNSHADOW for bottom right side
|
|
|
procedure Rounded_Rectangle (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom,
Ellipse_Width,
Ellipse_Height : in Integer);
|
|
Draw a rounded rectangle with current pen and fill with current brush
|
|
procedure Chord (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom,
XRadial1, YRadial1,
XRadial2, YRadial2 : in Integer);
|
|
Draw a chord with current pen and fill with current brush
|
|
procedure Ellipse (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom : in Integer);
|
|
Draw an ellipse with current pen and fill with current brush
|
|
procedure Pie (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom,
XRadial1, YRadial1,
XRadial2, YRadial2 : in Integer);
|
|
Draw a pie with current pen and fill with current brush
|
|
|
|
|
|
|
|
procedure Line (Canvas : in out Canvas_Type;
X1, Y1, X2, Y2 : in Integer);
|
|
Draw line from X1, Y1 to X2, Y2 using current pen
|
|
procedure Arc (Canvas : in out Canvas_Type;
Left, Top, Right, Bottom,
XStartArc, YStartArc, XEndArc, YEndArc : Integer);
|
|
Draw arc with current pen
|
|
procedure Beziers (Canvas : in out Canvas_Type;
Points : in GWindows.Types.Point_Array_Type);
|
|
Draw bezier curves using current pen
Draws cubic Bezier curves by using the endpoints and control
points specified by the points parameter. The first curve is drawn
from the first point to the fourth point by using the second and
third points as control points. Each subsequent curve in the
sequence needs exactly three more points: the ending point of
the previous curve is used as the starting point, the next two
points in the sequence are control points, and the third is the
ending point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure BitBlt
(Destination_Canvas : in out Canvas_Type;
Destination_X, Destination_Y : in Integer;
Destination_Width, Destination_Height : in Integer;
Source_Canvas : in Canvas_Type'Class;
Source_X, Source_Y : in Integer;
Raster_Operation_Code
: in Interfaces.C.unsigned := SRCCOPY);
|
|
Do a BitBlt (Copy a set of pixels from one canvas to another)
|
|
procedure StretchBlt
(Destination_Canvas : in out Canvas_Type;
Destination_X, Destination_Y : in Integer;
Destination_Width, Destination_Height : in Integer;
Source_Canvas : in Canvas_Type'Class;
Source_X, Source_Y : in Integer;
Source_Width, Source_Height : in Integer;
Raster_Operation_Code
: in Interfaces.C.unsigned := SRCCOPY);
|
|
Do a StretchBlt (Copy a set of pixels from one canvas to another
stretching or shrinking the image as needed)
|
|
|
|
|
|
|
|
function Point_Size (Canvas : in Canvas_Type;
Size : in Natural)
return Integer;
|
|
Calculates the the size of a font of Point_Size for this device
|
|
|
|
|
|
function Inside_Clipping_Area (Canvas : in Canvas_Type;
Left, Top, Right, Bottom : in Integer)
return Boolean;
|
|
True if any part of rectangular area is in the clipping area
|
|
|
function Map_Mode (Canvas : in Canvas_Type) return Integer;
|
|
Logigcal pixel mapping mode of device
|
|
|
|
|
|
|
|
|
|
procedure Scale_Window_Extents
(Canvas : in out Canvas_Type;
X_Multiplicand, X_Divisor : in Integer;
Y_Multiplicand, Y_Divisor : in Integer);
|
|
Window extents
|
|
|
|
|
|
|
|
|
|
|
type Memory_Canvas_Type is new Canvas_Type with private;
|
Memory_Canvas_Type
An in memory canvas that can be used for drawing and manipulation
in memory
|
|
procedure Create_Memory_Canvas
(Canvas : in out Memory_Canvas_Type;
Source_Canvas : in Canvas_Type'Class);
|
|
Create a Memory_Canvas that is compatible with Source_Canvas
A Bitmap memory image must be created using Create_Compatible_Bitmap
then selected in to the Memory_Canvas using Select_Object
|
|
|
|
|
|
|
|
|
|
|
private
|
|