[Cuis-dev] privateDisplayBounds wrong value
Juan Vuletich
juan at jvuletich.org
Fri Oct 22 16:12:20 PDT 2021
Please, give me full context, so I can browse all the code and play with
examples. Impossible to be of help otherwise! I.e. in the base image, no
morph answers #containsPoint:...
On 10/22/2021 6:03 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> Juan,
>
> 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.
> aCanvas
> 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.
>
> Hilaire
>
> [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
> http://drgeo.eu
> http://blog.drgeo.eu
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211022/223f0f06/attachment.htm>
More information about the Cuis-dev
mailing list