Seite 1 von 1

Kreis zeichnen

BeitragVerfasst: Di 23. Nov 2010, 15:52
von Paul94
Hi!

Gibt es einen Syscall um einen Kreis zu zeichnen, oder muss ich diese Funktion selber implementieren?

Paul

Re: Kreis zeichnen

BeitragVerfasst: Mi 24. Nov 2010, 00:02
von SimonLothar
Ich kopiere Dir einfach mal was aus meiner .
Ich hoffe es ist nicht so schlimm, wenn ich die Erläuterungen nicht übersetze.

0x02F: void Bdisp_ShapeToVRAM( p*TShape );
The function draws a dot, a line, a dashed line, a box or a circle to VRAM.

typedef struct{
unsigned int x1;
unsigned int y1;
unsigned int x2;
unsigned int y2;
unsigned char f[4];
unsigned int on_bits;
unsigned int off_bits;
} TShape;

x1, y1, x2, y2 define the shapes coordinates; details depend on the type of shape, see below.

on_bits/off_bits control the pattern of the dashed line types 3 and 4, see below.

f[0]: always 2;
f[1]: type of shape
1: dot at (x1;y1)
2: solid line from (x1;y1) to (x2;y2)
3: dashed line (starting with on_bits) from (x1;y1) to (x2;y2)
4: dashed line (starting with off_bits) from (x1;y1) to (x2;y2)
5: box from (x1;y1) to (x2;y2)
6: circle at (x1;y1) with radius x2
f[2] and f[3] control the draw mode (set, clear, invert)

f[2]=1;f[3]=1: set
f[2]=1;f[3]=4: invert
f[2]=2;f[3]=1: clear

f[2]=3 disables every second bit of the display, giving a dimmed appearance of any drawn shape.
f[2]=3;f[3]=1: invert; normal bit disabling, t. i. bit (0;0) is enabled
f[2]=3;f[3]=2: set; normal bit disabling, t. i. bit (0;0) is enabled
f[2]=3;f[3]=3: clear; normal bit disabling, t. i. bit (0;0) is enabled
f[2]=3;f[3]=4: invert; reverse bit disabling, t. i. bit (0;0) is disabled

0x032: void Bdisp_ShapeToDD( p*TShape );
The function draws a dot, a line, a dashed line, a box or a circle to DD. Details see 0x02F.

0x033: void Bdisp_ShapeToVRAM_DD( p*TShape );
The function draws a dot, a line, a dashed line, a box or a circle to VRAM and DD. Details see 0x02F.

Re: Kreis zeichnen

BeitragVerfasst: Mi 24. Nov 2010, 18:39
von Paul94
Danke schön, und Englisch ist auch in Ordnung.

Schönen Abend noch, Paul