Definition: |
include pGUI.e
sequence bounds = cdCanvasGetTextBounds(cdCanvas hCdCanvas, atom x, y, string text) -- or -- sequence bounds = wdCanvasGetTextBounds(cdCanvas hCdCanvas, atom x, y, string text) |
Description: | Returns the oriented bounding rectangle occupied by a text at a given position. |
Comments: |
The rectangle has the same dimensions returned by cdCanvasGetTextSize. The rectangle corners are returned in counter-clock wise order starting with the bottom left corner, arranged (x0,y0,x1,y1,x2,y2,x3,y3). Since the pGUI wrapper functions can accept integers and floats in the parameters, and return atoms or integers, there is no need for a separate cdfCanvasGetTextBounds wrapper. Internally cdCanvasGetTextBounds uses the cdfCanvasGetTextBounds C function. [CORRECTION: well, that was the plan, but (the C) cdfCanvasGetTextBounds gave me jip while cdCanvasGetTextBounds did not.] |