- This wiki is out of date, use the continuation of this wiki instead
Graphic
From FenixWiki
Revision as of 02:03, 12 May 2007 (edit) Sandman (Talk | contribs) ← Previous diff |
Current revision (10:45, 24 February 2008) (edit) (undo) Sandman (Talk | contribs) m (→Drawing Operations) |
||
(2 intermediate revisions not shown.) | |||
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. | ||
- | == Displaying a Graphic | + | == Displaying a Graphic == |
To display a graphic on the screen, there are two main ways of doing this: | To display a graphic on the screen, there are two main ways of doing this: | ||
* Using drawing operations listed [[:Category:maps|here]]. | * Using drawing operations listed [[:Category:maps|here]]. | ||
- | * Using | + | * Using [[process]]es and assigning graphics to their graph variable. |
Combinations can also be used naturally. | Combinations can also be used naturally. | ||
=== Drawing Operations === | === Drawing Operations === | ||
- | Graphics can be drawn onto each other, by the use of various [[:Category:maps|map functions]]. The functions use [[blit]]ting 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 [[ | + | Graphics can be drawn onto each other, by the use of various [[:Category:maps|map functions]]. The functions use [[blit]]ting 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_type]] is not [[NO_RESTORE]]). |
=== Process Graphs === | === 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. | 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. |
Current revision
Contents |
[edit] 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.
[edit] 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.
[edit] 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_type is not NO_RESTORE).
[edit] 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.