![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Printer Support Support Forum for printers: HP, Brother, Epson, Canon |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2008
Posts: 1
OS: Windows XP
|
Problem while performing stretch on HP 1010, HP 1018, HP 1020 and HP 3050
Our application uses Windows GDI library to perform rendering and display of data/output onto
the devices such as Screen and Printer. While I am trying to print the data onto a series of printers (HP 1010, HP 1018, HP 1020 and HP 3050) I am facing a typical problem. Explaination ----------- 1. Appropriate DC for the intended device is created [Printer DC created for a selected printer in this case] 2. The data is displayed onto the identified position onto the DC The details of data (fields) to be displayed and their position onto the DC is calculated before the printing begins. If sufficient space is available for displaying/printing a field (data), then it is displayed directly onto the DC (using TextOut. However at situations, the space available for printing (displaying) a piece of data may not be enough. In such scenario, I display such information onto a temperory (display) DC and then perform StretchBlt(....) onto the printer DC. StretchBlt is capable of performing both Stretch / shrink from source DC to the destination DC. [MSDN: The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. The system stretches or compresses (shrinks) the bitmap according to the stretching mode currently set in the destination device context]. In this case: - Data is first displayed / outputted onto tempDC - Then StretchBlt is performed from tempDC to PrinterDC The rectangular area on the destination DC is more than source rectangular area then data is stretched If the rectangular area on the destination DC is less than source rectangular area then data is shrinked StretchBlt(...) allows us to specify the raster operation to use while performing this task as its last parameter. Here I am using SRCAND. When I use SRCAND raster operation the data is displayed in actual font size instead of shrinking. This results on loss of data (as sufficient width/height) is not available to displayed data The same operation works on severla other DeskJet/LaserJet (including HP) printers. But it fails on the above mentioned set of printers. If I try to use other raster operation such as SRCCOPY, it is able to shrink the data and display properly. I can't use other operations. I have to use SRCAND (as I would like to retain any data that is already displayed within the rectangular area). I also observed that, if the destination rectangular area is more than source rectangular area: then it is able to stretch and display the data without any loss (even with SRCAND raster operation) Please let me know, if any of you have already encountered such problem and any solution Thanks & Regards, Harish Sohani Tally Solutions Pvt Ltd. Bangalore. Mob: 99020 16227 |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
![]() |
| Thread Tools | |
|
|