Miscellaneous support functions for OGL.
params marked with ‘???’ need review!
Centre a text |
|
Check for line intersection |
|
Draw arc to ellipse |
|
Draw formatted text |
|
Find the end for a box |
|
Find end for a circle |
|
Find the end for a polyline |
|
Format a text |
|
Get point on arrow |
|
Get the centred text extend |
|
Get point on a line |
|
Straighten a line in graphics |
|
Hittest for a polyline |
|
Check if values are roughly equal |
Centre a text
dc – the wx.MemoryDC
text_list – a list of texts
xpos – the x position
ypos – the y position
width – the width of the box???
height – the height of the box???
formatMode – one of the format modes, can be combined in a bit list
Format mode name |
Description |
---|---|
|
Left justification |
|
Centre horizontally |
|
Centre vertically |
|
Resize shape to contents |
Check for line intersection
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
x3 – x3 position
y3 – y3 position
x4 – x4 position
y4 – y4 position
a length ratio and a k line???
Draw arc to ellipse
x1 – x1 position
y1 – y1 position
width1 – width
height1 – height
x2 – x2 position
y2 – y2 position
x3 – x3 position
y3 – y3 position
ellipse points ???
Draw formatted text
dc – the wx.MemoryDC
text_list – a list of texts
xpos – the x position
ypos – the y position
width – the width of the box???
height – the height of the box???
formatMode – one of the format modes, can be combined in a bit list
Format mode name |
Description |
---|---|
|
Left justification |
|
Centre horizontally |
|
Centre vertically |
|
Resize shape to contents |
Find the end for a box
width – the width of the box
height – the height of the box
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
the end position
Find end for a circle
radius – radius
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
end position
Find the end for a polyline
xvec – x vector ???
yvec – y vector ???
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
the end position
Format a text
dc – the wx.MemoryDC
text – the text to format
width – the width of the box???
height – the height of the box??? it is not used in the code!
formatMode – one of the format modes, can be combined in a bit list
Format mode name |
Description |
---|---|
|
Left justification |
|
Centre horizontally |
|
Centre vertically |
|
Resize shape to contents |
a list of strings fitting in the box
Get point on arrow
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
length – length ???
width – width ???
point on line
Get the centred text extend
dc – the wx.MemoryDC
text_list – a list of text lines
xpos – unused
ypos – unused
width – unused
height – unused
maximum width and the height
Get point on a line
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
length – length ???
point on line
Straighten a line in graphics
point1 – a point list???
point2 – a point list???
Hittest for a polyline
xvec – x vector ???
yvec – y vector ???
x1 – x1 position
y1 – y1 position
x2 – x2 position
y2 – y2 position
True
or False
Check if values are roughly equal
val1 – the first value to check
val2 – the second value to check
tol – the tolerance, defaults to 0.00001
True
or False