Hi,
I read about the three different coordinate spaces and even though I
thought I understand the concept I still can't get the result I am
looking for.
Here is what I want to do, maybe you can help:
I draw a string onto the background of a control using its graphics
context. The string should have a size relative to the size of the
control's client area. When the control shrinks/grows the font size
should shrink/grow as well.
I could do this by reacting on the resize event of my control and then
simply use a new font with the adjusted size, but I don't want that,
since the font size is a public property of that control and I want it
to be independent of the size of the control.
Is there a way to specify the font size as a "virtual size" the way I
described above? I have the feeling, that this should somehow work by
translating from one coordinate space to the other, but I don't know
how.
Thanks for any hint...
Sascha
I read about the three different coordinate spaces and even though I
thought I understand the concept I still can't get the result I am
looking for.
Here is what I want to do, maybe you can help:
I draw a string onto the background of a control using its graphics
context. The string should have a size relative to the size of the
control's client area. When the control shrinks/grows the font size
should shrink/grow as well.
I could do this by reacting on the resize event of my control and then
simply use a new font with the adjusted size, but I don't want that,
since the font size is a public property of that control and I want it
to be independent of the size of the control.
Is there a way to specify the font size as a "virtual size" the way I
described above? I have the feeling, that this should somehow work by
translating from one coordinate space to the other, but I don't know
how.
Thanks for any hint...
Sascha