[Cuis-dev] privateDisplayBounds wrong value

Hilaire Fernandes hilaire at drgeo.eu
Fri Oct 22 14:03:41 PDT 2021


But for text like view in the model, I have this method bellow that does 
not work anymore:

containsPoint: globalPoint
"We really want rectangle detection, more user friendly"
     ^ self canBeDrawn
         and: [self displayBounds
             ifNil: [false]
             ifNotNil: [:d | d containsPoint: globalPoint ]]

It it render as (if it matter):

drawOn: aCanvas
     | r |
     self contents: mathItem text.
     r _ self labelPosition extent: extent.
         textComposition: textComposition
         bounds: (r insetBy: 4)
         color: color
         selectionColor: `Color red`.

I can compute by hand the bounding box of the morph, but not sure about 
what is happening here and I want to mention it.


[1] it makes it easier for the user to select textual object.

Le 22/10/2021 à 15:59, Juan Vuletich a écrit :
> That variable is for internal use of the framework. Usually you don't 
> need to care about its value. Sometimes it will be nil. Sometimes it 
> will be a null rectangle (like in the example you saw). Sometimes it 
> will be a valid rectangle. Don't worry.

GNU Dr. Geo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211022/b6b14dac/attachment.htm>

More information about the Cuis-dev mailing list