How do I control the labeling of a segment?

classic Classic list List threaded Threaded
3 messages Options
HJH
Reply | Threaded
Open this post in threaded view
|

How do I control the labeling of a segment?

HJH
Hello Hilaire

I have


    | c ptA ptB ptC angle segA segB segC|
    c := DrGeoCanvas new.
    ptA := c point: 0@0.
    ptA name: 'A'.
    ptB := c point: 4@3.
    ptB name: 'B'.
    ptC := c point: 4@0.
    ptC name: 'C'.
    angle  := c angle: ptB to: ptC to: ptA.
    angle show.
    c segment: ptC to: ptA.
    segA :=c segment: ptC to: ptB.
    segA name: 'a'.
    segB := c segment: ptC to: ptA.
    segB name: 'b'.
    segC := c segment: ptA to: ptB.
    segC name: 'c'.


The result is

right triangle

Is is possible to control the positioning of the label of segment c?

--Hannes
Reply | Threaded
Open this post in threaded view
|

Re: How do I control the labeling of a segment?

Hliaire Fernandes
Administrator
Although it is not documented at the user level, it should be possible to adjust it. After all it is all Smalltalk.

You should look at the method:

DrGMathItemCostume>>constraintTextPosition:

Hilaire
Reply | Threaded
Open this post in threaded view
|

Re: How do I control the labeling of a segment?

Hilaire Fernandes
Administrator
Le 07/10/2018 à 11:23, Hliaire Fernandes [via Dr. Geo Forum] a écrit :
Although it is not documented at the user level, it should be possible to adjust it. After all it is all Smalltalk.

You should look at the method:

DrGMathItemCostume>>constraintTextPosition:


To make its use smooth I committed a few changes.

See https://bugs.launchpad.net/drgeo/+bug/1796560

Hilaire

Was this message helpful?
Tell us!