In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Printing picture
-
- Mensajes: 126
- Registrado: Lun Mar 29, 2010 10:24 am
Printing picture
How do you print a picture in the right size? When I use the :nWidth and :nHeight of the picture on top the nTeft and nTop coordinates of the drawpicture it's too small. So i have to convert the pixel width and height to right values? Tried PixelstoMapMode... but no success.
- ignacio
- Site Admin
- Mensajes: 9447
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Printing picture
Maarten,
with object oCanvas
:nMapMode := mmHIMETRICS
:DrawPicture( nDesiredMMLeft, nDesiredMMTop, nDesiredMMRight,
nDesiredMMBottom, oPicture )
end with
Ie, you are the one that must specify the size in milimiters. You should
keep the aspect ratio and the bitmap should be big enough to avoid the
pixelation effect.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Maarten Roos" escribió en el mensaje de
noticias:4d2d8120$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
How do you print a picture in the right size? When I use the
:nWidth and :nHeight of the picture on top the nTeft and
nTop coordinates of the drawpicture it's too small. So i
have to convert the pixel width and height to right values?
Tried PixelstoMapMode... but no success.
with object oCanvas
:nMapMode := mmHIMETRICS
:DrawPicture( nDesiredMMLeft, nDesiredMMTop, nDesiredMMRight,
nDesiredMMBottom, oPicture )
end with
Ie, you are the one that must specify the size in milimiters. You should
keep the aspect ratio and the bitmap should be big enough to avoid the
pixelation effect.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Maarten Roos" escribió en el mensaje de
noticias:4d2d8120$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
How do you print a picture in the right size? When I use the
:nWidth and :nHeight of the picture on top the nTeft and
nTop coordinates of the drawpicture it's too small. So i
have to convert the pixel width and height to right values?
Tried PixelstoMapMode... but no success.
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 126
- Registrado: Lun Mar 29, 2010 10:24 am
Printing picture
Thank you... I had that already, but what I was wondering is the following. I have now for example:
nWidth := ::oChemicalPicture:oPicture:nWidth * 2.7
nHeight := ::oChemicalPicture:oPicture:nHeight * 2.7
PrintBitmap(Printer:oCanvas,::oChemicalPicture:oPicture, 550, nXpos, 550+nWidth, nXpos+nHeight)
STATIC FUNCTION PrintBitmap( oReport, oBitmap, nLeft, nTop, nRight, mBottom )
LOCAL nMapMode
WITH OBJECT oReport
nMapMode := :nMapMode
:nMapMode := mmHIMETRICS
:DrawPicture( {nLeft, nTop, nRight, mBottom}, oBitmap )
:nMapMode := nMapMode
END WITH
RETURN NIL
I have to use *2.7 to get the picture on desired format, otherwise it is way to small compared to original size. Can the 2.7 be calculated automatically?
nWidth := ::oChemicalPicture:oPicture:nWidth * 2.7
nHeight := ::oChemicalPicture:oPicture:nHeight * 2.7
PrintBitmap(Printer:oCanvas,::oChemicalPicture:oPicture, 550, nXpos, 550+nWidth, nXpos+nHeight)
STATIC FUNCTION PrintBitmap( oReport, oBitmap, nLeft, nTop, nRight, mBottom )
LOCAL nMapMode
WITH OBJECT oReport
nMapMode := :nMapMode
:nMapMode := mmHIMETRICS
:DrawPicture( {nLeft, nTop, nRight, mBottom}, oBitmap )
:nMapMode := nMapMode
END WITH
RETURN NIL
I have to use *2.7 to get the picture on desired format, otherwise it is way to small compared to original size. Can the 2.7 be calculated automatically?
- ignacio
- Site Admin
- Mensajes: 9447
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Printing picture
Maarten,
Maarten,
That value is completely arbitrary. It may work on your side but obviously
you will get different printing sizes depending on the printer resolution
you use. A bitmap of 300 x 300 pixels will have a size of one inch on very
old laser printers of 300 d.p.i., but on 1200 dpi laser printers will have a
size of a quarter of a inch.
As you can see there is not an easy conversion from pixels to inches or
millimeters, it depends on the the target resolution device. SO, my
recommendation is :
Never use pixel coordinates or dimensions when printing, always use
millimeters or inch map mode.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Maarten Roos" escribió en el mensaje de
noticias:4d2dd0ff$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Thank you... I had that already, but what I was wondering is
the following. I have now for example:
nWidth := ::oChemicalPicture:oPicture:nWidth * 2.7
nHeight := ::oChemicalPicture:oPicture:nHeight * 2.7
PrintBitmap(Printer:oCanvas,::oChemicalPicture:oPicture,
550, nXpos, 550+nWidth, nXpos+nHeight)
STATIC FUNCTION PrintBitmap( oReport, oBitmap, nLeft, nTop,
nRight, mBottom )
LOCAL nMapMode
WITH OBJECT oReport
nMapMode := :nMapMode
:nMapMode := mmHIMETRICS
:DrawPicture( {nLeft, nTop, nRight, mBottom}, oBitmap
)
:nMapMode := nMapMode
END WITH
RETURN NIL
I have to use *2.7 to get the picture on desired format,
otherwise it is way to small compared to original size. Can
the 2.7 be calculated automatically?
Maarten,
That value is completely arbitrary. It may work on your side but obviously
you will get different printing sizes depending on the printer resolution
you use. A bitmap of 300 x 300 pixels will have a size of one inch on very
old laser printers of 300 d.p.i., but on 1200 dpi laser printers will have a
size of a quarter of a inch.
As you can see there is not an easy conversion from pixels to inches or
millimeters, it depends on the the target resolution device. SO, my
recommendation is :
Never use pixel coordinates or dimensions when printing, always use
millimeters or inch map mode.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
http://www.xailer.com/forum
http://www.xailer.com/dokuwiki
"Maarten Roos" escribió en el mensaje de
noticias:4d2dd0ff$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
Thank you... I had that already, but what I was wondering is
the following. I have now for example:
nWidth := ::oChemicalPicture:oPicture:nWidth * 2.7
nHeight := ::oChemicalPicture:oPicture:nHeight * 2.7
PrintBitmap(Printer:oCanvas,::oChemicalPicture:oPicture,
550, nXpos, 550+nWidth, nXpos+nHeight)
STATIC FUNCTION PrintBitmap( oReport, oBitmap, nLeft, nTop,
nRight, mBottom )
LOCAL nMapMode
WITH OBJECT oReport
nMapMode := :nMapMode
:nMapMode := mmHIMETRICS
:DrawPicture( {nLeft, nTop, nRight, mBottom}, oBitmap
)
:nMapMode := nMapMode
END WITH
RETURN NIL
I have to use *2.7 to get the picture on desired format,
otherwise it is way to small compared to original size. Can
the 2.7 be calculated automatically?
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com