Solved

CopyRect Will not copy text

Posted on 2001-08-03
3
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 34

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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