FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio: Extension and correction of Tgdiplus-Class
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
To Antonio: Extension and correction of Tgdiplus-Class
Posted: Mon Apr 01, 2013 12:32 PM
Antonio, in Gdiplus-class we must set the Units to Pixel. Printing are not correct in Pixels, as the Printers are different in DPI.

In Code from Class:
Code (fw): Select all Collapse
METHOD New( hDC , lNoHighQuality ) CLASS Graphics
    ::hGraphics = GdiPlusNewGraphics( hDC )
    SetPageUnit2Pixel( ::hGraphics );   //NEW !! Unit to Pixel
...


Add this function in Code from gdiplus.cpp:
Code (fw): Select all Collapse
HB_FUNC( SETPAGEUNIT2PIXEL )
{
   Graphics * graphics = ( Graphics * ) hb_parnl( 1 );
    graphics->SetPageUnit(UnitPixel);   //Unit to Pixel
}


Antonio, i had sent to you a privat E-Mail for updating my FWH but no answer!?
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: To Antonio: Extension and correction of Tgdiplus-Class
Posted: Wed Apr 03, 2013 01:02 PM

Antonio, please do not forget to add this correction, as no right printing in GDI+ are possible.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio: Extension and correction of Tgdiplus-Class
Posted: Wed Apr 03, 2013 02:25 PM

Günther,

Added for next FWH build, thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion