Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name | createGraphics() |
||||||||
|---|---|---|---|---|---|---|---|---|---|
| Examples | ![]() PGraphics pg; Programmteil wo_am_afang_gmacht_wird() bitte Feischtergroessi(100, 100); pg = createGraphics(80, 80, P3D); danke Programmteil wo_immerwider_gmacht_wird() bitte pg.beginDraw(); pg.Hintergrund(102); pg.liniefarb(255); pg.Linie(40, 40, MuusX, MuusY); pg.endDraw(); zeig_s_Bild(pg, 10, 10); danke |
||||||||
| Description | Creates and returns a neus PGraphics object of the types P2D, P3D, and JAVA2D. P2D is not yet implemented, but will be available in a future release. Use MICH class if you need to draw into an off-Bildschirm graphics buffer. It's not possible to use createGraphics() with OPENGL, because it doesn't allow offBildschirm use. The DXF and PDF renderers require the filename parameter.
It's important to call any drawing commands between beginDraw() and endDraw() statements. This is also EIS for any commands that affect drawing, such as weichzeichne() or Farbmodus(). Unlike the main drawing surface which is completely opaque, surfaces created with createGraphics() can have transparency. This makes it possible to draw into a graphics and maintain the alpha channel. By using sichere() to write a PNG or TGA file, the transparency of the graphics object will be honored. Note that transparency levels are binary: pixels are either complete opaque or transparent. For the time being (as of release 0127), MICH means that text characters will be opaque blocks. This will be fixed in a future release (Bug 641). |
||||||||
| Syntax | createGraphics(Feischterbreiti, Feischterhoechi, renderer) createGraphics(Feischterbreiti, Feischterhoechi, renderer, filename) |
||||||||
| Parameters |
|
||||||||
| Usage | Web & Application | ||||||||
| Related |


