Open main menu

Difference between revisions of "SCI/FreeSCI/Graphics/Drivers"

Merging of the FreeSCI documentation. Page done.
(Merging of the FreeSCI documentation. Work in progress.)
 
(Merging of the FreeSCI documentation. Page done.)
 
Line 19: Line 19:
==Initialization and shutdown functionality==
==Initialization and shutdown functionality==
None of the functions defined in here are optional. They are called during startup or shutdown and need not be considered performance critical.  
None of the functions defined in here are optional. They are called during startup or shutdown and need not be considered performance critical.  


;set_parameter(attribute, value)
;set_parameter(attribute, value)
Line 41: Line 42:
==Primitive drawing operations==
==Primitive drawing operations==
"Primitive drawing operations" here are operations that draw primitives. FreeSCI uses only two graphics primitives: Lines and solid boxes, both of which are commonly provided by graphics libraries. Both operations draw to the back buffer; they also must respect the priority aspect of the primary color used on them.
"Primitive drawing operations" here are operations that draw primitives. FreeSCI uses only two graphics primitives: Lines and solid boxes, both of which are commonly provided by graphics libraries. Both operations draw to the back buffer; they also must respect the priority aspect of the primary color used on them.
;draw_line(line, color, line_mode, line_style)
:Draws a single line. The line parameter describes the starting point and a relative coordinates of the line to draw in the specified color, whereas <tt>line_mode</tt> specifies the line mode to use. This value may be <tt>GFX_LINE_MODE_FAST</tt>, which means that the line's thickness is roughly about the average of the horizontal and vertical scaling factors. The other two values need not be supported (they should fall back to <tt>GFX_LINE_MODE_FAST</tt> if they're used'):
:;<tt>GFX_LINE_MODE_FAST</tt> : Line thickness is averate of x and y scale factors.
:;<tt>GFX_LINE_MODE_CORRECT</tt> : Lines are scaled separately for x and y and have correct widths there.
:;<tt>GFX_LINE_MODE_THIN</tt> : Line has a width of 1.
:The other parameter, line_style, may be either of <tt>GFX_LINE_STYLE_NORMAL</tt> or <tt>GFX_LINE_STYLE_STIPPLED</tt>, although the latter is used iff the capability flag <tt>GFX_CAPABILITY_STIPPLED_LINES</tt> is set.
:This function must return GFX_OK or GFX_FATAL.
;draw_filled_rect(rect, color1, color2, shade_mode)
==Pixmap operations==
==Buffer operations==
==The mouse pointer==
==Palette==
==Event management==
==Capability flag summary==




236

edits