Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » does ImageCtrl position depends on dpi ?
does ImageCtrl position depends on dpi ? [message #24015] Thu, 17 December 2009 14:32 Go to previous message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Hi everyone,

I design a small app under Ubuntu.

I am currently using the Layout Designer to design the layout of my app.

I want to display three images (successfully imported in my .iml) which are 32x32 pixels each, vertically, and with no margin between them, like this:
 ----
| 1  |
|    |
 ----
| 2  |
|    |
 ----
| 3  |
|    |
 ----


On the layout designer, I create User Classes with ImgCtrl class and I make the borders touch themselves. I checked in the text content of the layout file, everything is alright, I have 32 pixels between each position.

But when launching the real app, I am disapointed to see they do not touch themselves anymore.

I then tried to change the DPI of my screen, and tada ! I can see that the relative position (in pixels) between the ImgCtrls is not the same.

I believe this is because we are dependent on the dpi when positioning images.

How can I solve my problem ?

Here is the illustration at 96 dpi (original):

index.php?t=getfile&id=2051&private=0

And at 72 dpi (images correctly touch themselves)

index.php?t=getfile&id=2052&private=0

Thanks,
Lionel
  • Attachment: at_96dpi.png
    (Size: 5.95KB, Downloaded 766 times)
  • Attachment: at_72dpi.png
    (Size: 5.41KB, Downloaded 1007 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Draw without CtrlLib [SOLVED] - see ConsoleDraw example
Next Topic: IMAGECLASS::Iml() crashes
Goto Forum:
  


Current Time: Fri Apr 26 02:23:20 CEST 2024

Total time taken to generate the page: 0.03131 seconds