1 Pages (4 items)
Picture Region - source code - Messages
#1 Posted: 5/19/2016 2:12:14 PM
Hello All,
I am investigating why, when plotted, Picture Region displays correctly, while Image Region is scaled down / up depending on the system DPI setting.
It would help to look at the source code of Picture Region. Any ideas where I can find it?
Thanks!
I am investigating why, when plotted, Picture Region displays correctly, while Image Region is scaled down / up depending on the system DPI setting.
It would help to look at the source code of Picture Region. Any ideas where I can find it?
Thanks!
#2 Posted: 5/19/2016 7:52:00 PM
Please check e-mail from me.
Regards.
Regards.
#3 Posted: 5/19/2016 8:38:46 PM
Welcome to the jungle 
GDI+ (that we use to draw regions) is designed to render the things with the same size on all the devices (it means that if you take a ruler, same stuff in devices with different DPI should be rendered with the same size). Forms instead are drawn with GDI, and are scaled (see here); fonts in GDI+ are scaled too.
For what I cans see, both picture and image edit regions act in the same way, as well as the worksheet (unscaled).
In the article above, Microsoft says:
Alternatively the other choice should be to scale all the font-sizes to be device-indipendent as they are now the canvas and the regions...

GDI+ (that we use to draw regions) is designed to render the things with the same size on all the devices (it means that if you take a ruler, same stuff in devices with different DPI should be rendered with the same size). Forms instead are drawn with GDI, and are scaled (see here); fonts in GDI+ are scaled too.
For what I cans see, both picture and image edit regions act in the same way, as well as the worksheet (unscaled).
In the article above, Microsoft says:
QuoteIf your application is DPI-aware and you use GDI for drawing, scale all of your drawing coordinates to match the DPI.
Alternatively the other choice should be to scale all the font-sizes to be device-indipendent as they are now the canvas and the regions...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 5/21/2016 6:29:23 PM
Actually with the help of Andrey's Picture Region it was fairly straight forward to get very high quality PDF prints (see attached).
I have an issue though. When I "reset to original size", the image does re-draw to original size, however the size of the region does not change...

(Note the shorter and wider rectangle - that is the region size prior to reset click)
Davide, Andrey, do you have any suggestions what might be happening here?
Thanks!
ImageTestFile.2.pdf (1 MiB) downloaded 31 time(s).
ImageTestFile.sm (3 MiB) downloaded 27 time(s).
code
MyRev.zip (153 KiB) downloaded 31 time(s).
I have an issue though. When I "reset to original size", the image does re-draw to original size, however the size of the region does not change...
(Note the shorter and wider rectangle - that is the region size prior to reset click)
Davide, Andrey, do you have any suggestions what might be happening here?
Thanks!
ImageTestFile.2.pdf (1 MiB) downloaded 31 time(s).
ImageTestFile.sm (3 MiB) downloaded 27 time(s).
code
MyRev.zip (153 KiB) downloaded 31 time(s).
1 Pages (4 items)
-
New Posts
-
No New Posts