Miscellaneous support functions for OGL.
params marked with ‘???’ need review!
CentreText |
Centre a text |
CheckLineIntersection |
Check for line intersection |
DrawArcToEllipse |
Draw arc to ellipse |
DrawFormattedText |
Draw formated text |
FindEndForBox |
Find the end for a box |
FindEndForCircle |
Find end for a circle |
FindEndForPolyline |
Find the end for a polyline |
FormatText |
Format a text |
GetArrowPoints |
Get point on arrow |
GetCentredTextExtent |
Get the centred text extend |
GetPointOnLine |
Get point on a line |
GraphicsStraightenLine |
Straighten a line in graphics |
PolylineHitTest |
Hittest for a polyline |
RoughlyEqual |
Check if values are roughtly equal |
CentreText
(dc, text_list, xpos, ypos, width, height, formatMode)¶Centre a text
Parameters: |
|
---|
CheckLineIntersection
(x1, y1, x2, y2, x3, y3, x4, y4)¶Check for line intersection
Parameters: |
|
---|---|
Returns: | a lenght ratio and a k line??? |
DrawArcToEllipse
(x1, y1, width1, height1, x2, y2, x3, y3)¶Draw arc to ellipse
Parameters: |
|
---|---|
Returns: | ellipse points ??? |
DrawFormattedText
(dc, text_list, xpos, ypos, width, height, formatMode)¶Draw formated text
Parameters: |
|
---|
FindEndForBox
(width, height, x1, y1, x2, y2)¶Find the end for a box
Parameters: |
|
---|---|
Returns: | the end position |
FindEndForCircle
(radius, x1, y1, x2, y2)¶Find end for a circle
Parameters: |
|
---|---|
Returns: | end position |
FindEndForPolyline
(xvec, yvec, x1, y1, x2, y2)¶Find the end for a polyline
Parameters: |
|
---|---|
Returns: | the end position |
FormatText
(dc, text, width, height, formatMode)¶Format a text
Parameters: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | a list of strings fitting in the box |
GetArrowPoints
(x1, y1, x2, y2, length, width)¶Get point on arrow
Parameters: |
|
---|---|
Returns: | point on line |
GetCentredTextExtent
(dc, text_list, xpos=0, ypos=0, width=0, height=0)¶Get the centred text extend
Parameters: |
|
---|---|
Returns: | maximum width and the height |
GetPointOnLine
(x1, y1, x2, y2, length)¶Get point on a line
Parameters: |
|
---|---|
Returns: | point on line |
GraphicsStraightenLine
(point1, point2)¶Straighten a line in graphics
Parameters: |
|
---|
PolylineHitTest
(xvec, yvec, x1, y1, x2, y2)¶Hittest for a polyline
Parameters: |
|
---|---|
Returns: |
|
RoughlyEqual
(val1, val2, tol=0.00001)¶Check if values are roughtly equal
Parameters: |
|
---|---|
Returns: |
|