Das Deutsche Casio-Taschenrechner Forum wurde zum 31.12.2013 geschlossen und kann weiterhin als Nachschlagewerk verwendet werden.
Wer mehr erfahren möchte: Ein sehr guter Beitrag von Elias

Kreis zeichnen

Hilfe beim Programmieren mit dem fx-9860G SDK.

Kreis zeichnen

Beitragvon Paul94 » Di 23. Nov 2010, 15:52

Hi!

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

Paul
Paul94
 
Beiträge: 219
Registriert: Do 14. Mai 2009, 06:50
Taschenrechner:

Re: Kreis zeichnen

Beitragvon SimonLothar » Mi 24. Nov 2010, 00:02

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.
SimonLothar
 
Beiträge: 228
Registriert: Mi 27. Mai 2009, 10:51
Taschenrechner:

Re: Kreis zeichnen

Beitragvon Paul94 » Mi 24. Nov 2010, 18:39

Danke schön, und Englisch ist auch in Ordnung.

Schönen Abend noch, Paul
Paul94
 
Beiträge: 219
Registriert: Do 14. Mai 2009, 06:50
Taschenrechner:


Zurück zu fx-9860G SDK (Alle fx-9860G Modelle)

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 8 Gäste