* Renderers
This commit is contained in:
parent
5611f17c70
commit
fa4beff167
|
@ -1,5 +1,5 @@
|
|||
with Video.Integer_Geometry, Video.Colors;
|
||||
use Video.Integer_Geometry, Video.Colors;
|
||||
with Video.Integer_Geometry, Video.Colors, Video.Pixels.Indexed;
|
||||
use Video.Integer_Geometry, Video.Colors, Video.Pixels.Indexed;
|
||||
package Video.Renderers with Pure is
|
||||
|
||||
type Renderer is limited interface;
|
||||
|
@ -7,7 +7,7 @@ package Video.Renderers with Pure is
|
|||
|
||||
-- Common subprograms
|
||||
|
||||
function Bounds (
|
||||
function Bounding_Box (
|
||||
R : Renderer)
|
||||
return Box is abstract;
|
||||
-- Coordinate limits of a surface
|
||||
|
@ -23,31 +23,19 @@ package Video.Renderers with Pure is
|
|||
|
||||
-- Defining rendering context
|
||||
|
||||
procedure Set_Pen_Color (
|
||||
procedure Set_Color (
|
||||
R : in out Renderer;
|
||||
C : in Color) is abstract;
|
||||
-- Set color of a pen
|
||||
|
||||
function Pen_Color (
|
||||
function Get_Color (
|
||||
R : Renderer)
|
||||
return Color is abstract;
|
||||
-- Query current pen color.
|
||||
-- Query current rendering color.
|
||||
-- Note: The function may return a value that is different to
|
||||
-- what is set because it may be stored converted to a device
|
||||
-- dependent format with loss of precision.
|
||||
|
||||
procedure Set_Fill_Color (
|
||||
R : in out Renderer;
|
||||
C : in Color) is abstract;
|
||||
-- Set color of a fill
|
||||
|
||||
function Fill_Color (
|
||||
R : Renderer)
|
||||
return Color is abstract;
|
||||
-- Query current fill color
|
||||
-- Note: Like with pen color this function may return
|
||||
-- value different to what is set.
|
||||
|
||||
procedure Set_Clip_Box (
|
||||
R : in out Renderer;
|
||||
B : in Box) is abstract;
|
||||
|
@ -62,17 +50,19 @@ package Video.Renderers with Pure is
|
|||
-- Usually use fill pattrn to render
|
||||
|
||||
procedure Clear (
|
||||
Target : in out Renderer) is abstract;
|
||||
R : in out Renderer) is abstract;
|
||||
-- Fill all surface (or clip box) with fill pattern
|
||||
|
||||
procedure Fill_Rectangle (
|
||||
R : in out Renderer;
|
||||
B : in Box) is abstract;
|
||||
R : in out Renderer;
|
||||
B : in Box) is abstract;
|
||||
-- Fill a rectangle with fill pattern
|
||||
|
||||
-- Line draw
|
||||
|
||||
procedure Plot (
|
||||
R : in out Renderer;
|
||||
A : in Point) is abstract;
|
||||
R : in out Renderer;
|
||||
A : in Point) is abstract;
|
||||
-- Draw a single point with pen
|
||||
|
||||
procedure Line (
|
||||
|
@ -80,4 +70,13 @@ package Video.Renderers with Pure is
|
|||
A, B : in Point) is abstract;
|
||||
-- Draw straight line with pen
|
||||
|
||||
-- Arbitrary shape draw
|
||||
|
||||
procedure Fill (
|
||||
R : in out Renderer;
|
||||
Bounds : in Box;
|
||||
Shape : in Index_1_Array;
|
||||
Offset : in Point) is abstract;
|
||||
-- Draw a shape defined by bitmap
|
||||
|
||||
end Video.Renderers;
|
||||
|
|
Loading…
Reference in New Issue