[Gambas-user] Drawing
Christopher Brian Jack
brian at ...1334...
Mon Apr 24 18:45:22 CEST 2006
On Mon, 24 Apr 2006, Christopher Brian Jack wrote:
> > Unknown if it is *inches*, *dots* or *pixels*
> > Normal paper sizes are given in inch or centimeter.
> > For the print head on old printers there are 72 dots/inch
> > 8" paper has then 576 dots as width
> > Be carefull DPI is NOT pixels.
> > My screen is 1280 pixels
>
> Many graphics programs allow calibration of the screen-to-printer DPI
> settings so that 100 pixels on screen shows in the image shows as the same
> dimensional (" or cm) size on the screen that it would be on the paper.
> This functionality is then accessed by a enabling a "[x] Show Print Size"
> menu option usually found in the graphics software's View menu.
You could also define things relatively (ie: as percents or some
reasonably larger fraction perhaps n/1000). In this case something size
50%x50% would take half the screen and half the printed page. Be sure to
account for aspect ratios of the screen and printed page however:
printer x=rel-x * Printer.width / rel-base
printer y=rel-y * Printer.height / rel-base
screen y=rel-x * Screen.width / rel-base
screen x=rel-x * Screen.height / rel-base
rel-base is the virtual dot size you wish to use in your rendering. As
percentages base is 100 but you could choose a larger base (like 1000ths)
since 1/100 is pretty low resolution
Adjustment for aspect must added is a square in relative units is square
on the screen or printer.
The above calculations need to modified if a square on the screen in rels
is also a square on the printer. The aspect of the printer page and
that of the screen need to BOTH be taken into account. The above
calculations don't do that.
.=================================================.
| Christopher BRIAN Jack aka "Gau of the Veldt" |
+================================================='
| brian _AT_ brians-anime _DOT_ com
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
More information about the User
mailing list