This wiki is out of date, use the continuation of this wiki instead

Graphic

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:10, 12 May 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Revision as of 02:20, 12 May 2007 (edit) (undo)
Sandman (Talk | contribs)
m
Next diff →
Line 1: Line 1:
 +[[Category:general]]
 +
== Definition == == Definition ==
A graphic (graph or map) is a bitmap with certain properties, like width, height, depth and of course the pixel data. It is used to give the program a graphical look. One can load graphics from files with for example [[load_png]]() or use [[Image.DLL]]. They can also be obtained from within [[FPG]]'s or [[FGC]]'s files, which are graphic collection files. To create one on the fly, the function [[new_map]]() can be used. [[:Category:maps|Here]]'s a list of functions related to graphics and maps. A graphic (graph or map) is a bitmap with certain properties, like width, height, depth and of course the pixel data. It is used to give the program a graphical look. One can load graphics from files with for example [[load_png]]() or use [[Image.DLL]]. They can also be obtained from within [[FPG]]'s or [[FGC]]'s files, which are graphic collection files. To create one on the fly, the function [[new_map]]() can be used. [[:Category:maps|Here]]'s a list of functions related to graphics and maps.

Revision as of 02:20, 12 May 2007


Contents

Definition

A graphic (graph or map) is a bitmap with certain properties, like width, height, depth and of course the pixel data. It is used to give the program a graphical look. One can load graphics from files with for example load_png() or use Image.DLL. They can also be obtained from within FPG's or FGC's files, which are graphic collection files. To create one on the fly, the function new_map() can be used. Here's a list of functions related to graphics and maps.

Displaying a Graphic

To display a graphic on the screen, there are two main ways of doing this:

  • Using drawing operations listed here.
  • Using processes and assigning graphics to their graph variable.

Combinations can also be used naturally.

Drawing Operations

Graphics can be drawn onto each other, by the use of various map functions. The functions use blitting as the method for drawing, which is a reasonably fast way, as Fenix makes use of MMX capabilities. A function like put() will draw a picture on the background, displaying it one the screen (if restore_mode is not NO_RESTORE).

Process Graphs

Graphics can be assigned to processes, which also have coordinate and transformation data. This is done by the use of the local variables graph, which holds the GraphID of a graph. The graphic is displayed, according to a few local variables influencing the graphic, like x, y, z, angle, etc.

Personal tools