Solved

CopyRect Will not copy text

Posted on 2001-08-03
3
150 Views
Last Modified: 2010-04-06
I'm trying to copy text and images from one canvas to my printer.canvas.

My goal is to inverse and turn up sidedown the text and images on the canvas to make a quad fold program.

I have a couple problems

1. If I use this code it only flip images

AtmpCanvas    := Printer.canvas;
  if (i - 1) mod 4 > 1 then
TmpInt := (TmpHeight div 2)
else TmpInt := 0;
DrawPage(AtmpCanvas,
        0 + (TmpWidth div 2 + SpaceBuffer) * ((i -        1) mod 2),
        0 + TmpInt,
        TmpWidth div 2,
        TmpHeight div 2,
        PrintArray[i],
        True,
        (TmpInt = 0) and      frmSelection.SelectionType in [selBulletin,   selSpecial, SelDirectory]));
 // this is suppost to flip it for Quarter
with Printer do
begin
  Canvas.CopyRect(Rect(0,TmpHeight div 2, TmpWidth div 2, 0), AtmpCanvas, Rect(0,0,TmpWidth div 2,TmpHeight div 2)); // vertical flip
Canvas.CopyRect(Rect(TmpWidth div 2, 0, 0, TmpHeight div 2), AtmpCanvas, Rect(0,0,TmpWidth div 2, TmpHeight div 2)); // horizontal flip
                                   end;
Other varities of this give me errors
0
Comment
Question by:mchagberg
3 Comments
 
LVL 33

Expert Comment

by:Slick812
ID: 6350919
you are filpping the image twice, but both are the ORIGINAL unflipped image on the AtmpCanvas so the printer image will be the LAST flip you did. you may need to get a temp Bitmap canvas and flip it again from there . . .

Canvas.CopyRect(Rect(0,TmpHeight div 2, TmpWidth div 2, 0), TempBitmap.Canvas, Rect(0,0,TmpWidth div 2,TmpHeight
div 2)); // vertical flip

Canvas.CopyRect(Rect(TmpWidth div 2, 0, 0, TmpHeight div 2), TempBitmap.Canvas, Rect(0,0,TmpWidth div 2, TmpHeight
div 2)); // horizontal flip
0
 

Author Comment

by:mchagberg
ID: 6352186
Slick812

AtmpCanvas is pointing to Printer.canvas so it is fliping the images right, but the text on the canvas does not flip with the images.  

Thanks
 
Mike (MCHagberg)
0
 

Accepted Solution

by:
wrinkley earned 200 total points
ID: 6373261
Try a componet called Texcellent printer.

www.code4sale.com
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Splash screen too shortlived 11 113
Newbie Thread Programming 1 118
Delphi XE10 Round Image 2 50
Reconfigure Delphi Install? 2 36
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now