Sebasti Schillm

Greenhorn
+ Follow
since Jan 08, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sebasti Schillm

Hello JavaFX friends,

i have problem whe I set style “fx-rotate” on the parents or parent.parent…. of the children node.
I have have a node with a drag listener which calculate the drag translateX, translateY.
It works fine and also works fine when i set for example node.setStyle("fx-rotate: 30").
But whne set the style on root.setStyle("fx-rotate: 30") or
parent.setStyle("fx-rotate: 30") the drag listener work incorect.
What can i do or have you an idea how can calculate the correct tranlatex, translatey
when the parent of node have an rotation on it’s style?

Here is an Example Code of my problem



Next exmple when i set style on each other parent of node the calculation is wrong



Thanks for your help
3 weeks ago
Hello JavaFX friends,

i need the real layoutX/layoutY in a transformed...(rotaded) node.

My problem is, i have a rotated node (in my example a pane) and add a label to the pane.
When i set the layoutX value ... the label is shift  the layoutY and not the x
coordinate? :eek:

Is it possible to get the reverse calculated bound from the
transformed pane?. So that can set the real x and y.

Her is the Example Application



My workaround is to use  label.getTransforms().add(new Translate(x,y)).
But in my drawing pane i have over 1000 shapes with labels and my worry
is thats become inperformant, than i set on each label the tanslate(x,y) transform.

Thanks for your help and greetings
sebastian
4 months ago
thank you very much John Damien Smith i understand and try this for an solution otherwise i must revert from label to scene.text

thanks and greetings
sebastia
1 year ago
Hello John Damien Smith,

thank for your answer.

Yes I know with scene.Text and TextBoundsType.VISUAL but i need some css propertys that is not supported by scene.text control
(-fx-text-fill , -fx-graphic  ,-fx-graphic-hpos ,-fx-graphic-text-gap ,-fx-graphic-vpos ,-fx-hpos, -fx-text ,-fx-text-alignment, -fx-text-overrun ,-fx-text-wrap, -fx-vpos.... not supported by scene.control)
I don't understand your tip with text property listener, because i think scene.Text doesn't support TextBoundsTypes respectively nothing found in code javafx.scene.control.Labeled and javafx.scene.control.Label

greeting
sebastian
1 year ago
Hello JavaFX friends,

i need the real ones text minX/maxX and minY/maxY layout bounds from a label control? (with a scaled transformation and different text)

For Example i have three labels

label one : "Example"
label two : "Check"
label three : "ÖßgLWy"

When i print the bounds, then those are not the right ones from real text

Label Example
MinX : 400.0
MaxX : 444.255859375
MinY : 400.0
MaxY : 417.0

but i need the real bounds from text (minY: 404 and maxY: 406 minX: 401 and maxX: 444 )

Label Check
MinX : 500.0
MaxX : 532.00390625
MinY : 600.0
MaxY : 617.0

but i need the real bounds from text (minY: 604 and maxY: 413 minX: 501 and maxX: 532 )


label three : ÖßgLWy
MinX : 600.0
MaxX : 645.3046875
MinY : 400.0
MaxY : 417.0

but i need the real bounds from text (minY: 432 and maxY: 446 minX: 601 and maxX: 645 )


*********************************************************
same with scale
*********************************************************
Label Example
MinX : 200.0
MaxX : 332.767578125
MinY : 200.0
MaxY : 251.0

but i need the real bounds from text (minY: 212 and maxY: 247 minX: 203 and maxX: 233 )

Label Check
MinX : 500.0
MaxX : 596.01171875
MinY : 800.0
MaxY : 851.0
but i need the real bounds from text (minY: 812 and maxY: 839 minX: 502 and maxX: 596 )

label three : ÖßgLWyMinX :
MinxX: 800.0
MaxX : 935.9140625
MinY : 200.0
MaxY : 251.0

but i need the real bounds from text (minY: 209 and maxY: 741 minX: 802 and maxX: 936 )

can someone please help me to get the real tet bounds for current font



Her is the Example Application


thanks for your help and greetings
sebastian
1 year ago