Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread TImage coordinate calculation
Tue, May 23 2017 8:26 AMPermanent Link

thomh

Hey, guys.

Not really a EWB problem but more of a math exercise:

I've got a TImage whose ActualWidth and Height are 2480 x 3508 px
The TImage Width and Height are 530 x 760
I draw a rectangle on this image that starts at Left = 377 and Top = 549
How would I calculate those coordinates to the actual (2480 x 3508) image?

Thanks.

// Thom
Tue, May 23 2017 8:47 AMPermanent Link

Uli Becker

If I don't misunderstand you: just using a factor (2480:530=4.68) and multiplicating 377 with this factor e. g. should do it.

Uli
Tue, May 23 2017 9:08 AMPermanent Link

thomh

>Uli Becker wrote:
>
>If I don't misunderstand you: just using a factor (2480:530=4.68) and multiplicating 377 with this factor e. g. should do >it.
>
>Uli

Yeah, that should do it alright.

Thanks, Uli.

// Thom
Image