Drawing on top of an application

Drawing on top of an application

Post by Dan Cumpia » Sat, 28 Jun 2003 07:29:38



I've figured out how to draw an image on top of an application using a
TCanvas that has the desktop's handle. Now, how do I clear the image off
of the application?

Second question: Is there any way to get the Canvas image to display
proportionately as it would in a TImage?

Thanks,
Dan

 
 
 

Drawing on top of an application

Post by Charles Hacke » Sat, 28 Jun 2003 08:01:59



> I've figured out how to draw an image on top of an application using a
> TCanvas that has the desktop's handle. Now, how do I clear the image off
> of the application?

Do a system wide repaint.

RedrawWindow( 0, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_UPDATENOW or
 RDW_ERASENOW );

Quote:> Second question: Is there any way to get the Canvas image to display
> proportionately as it would in a TImage?

You would have to Resize the image your self!

One technique is to first off draw the image to a bitmap, then
Strechdraw the bitmap to a bigger/smaller size, then draw that resized
bitmap to the desktop canvas.

--
Charles Hacker
Lecturer in Electronics and Computing
School of Engineering
Griffith University - Gold Coast
Australia

 
 
 

Drawing on top of an application

Post by Dan Cumpia » Sat, 28 Jun 2003 12:36:41


These words of wisdom from Charles Hacker arrived on 6/26/2003 7:01:59


>> I've figured out how to draw an image on top of an application using a
>> TCanvas that has the desktop's handle. Now, how do I clear the image off
>> of the application?

>Do a system wide repaint.

>RedrawWindow( 0, nil, 0, RDW_ERASE or RDW_INVALIDATE or RDW_UPDATENOW or
> RDW_ERASENOW );

>> Second question: Is there any way to get the Canvas image to display
>> proportionately as it would in a TImage?

>You would have to Resize the image your self!

>One technique is to first off draw the image to a bitmap, then
>Strechdraw the bitmap to a bigger/smaller size, then draw that resized
>bitmap to the desktop canvas.

Thanks for the above redraw info.

As far as the stretched image is concerned, I am already using
Canvas.StretchDraw() to draw the image that is loaded in a TImage. What I
am doing is allowing the user to examine an image by dragging it with the
mouse to make it larger. In the thumbnail, the image is drawn
proportionally (using the Proportion property of the TImage). However,
when drawn on the canvas, it fills the entire rectangle rather than using
the TImage property. Is there no way to override this?

Quote:>--
>Charles Hacker
>Lecturer in Electronics and Computing
>School of Engineering
>Griffith University - Gold Coast
>Australia

Thank you,
Dan Cumpian
 
 
 

1. __The TOP LINUX APPLICATION

               w  w  w . l i n u x c a d .  c o m
               w w w . s o f t w a r e f o r g e . c o m
                    or call to 913 663 1724

  Now new technical illustration and diagramming program for Linux and Solaris is available !!!
=================================================================================================

               w  w  w . l i n u x c a d .  c o m
               w w w . s o f t w a r e f o r g e . c o m
                    or call to 913 663 1724

   Linux CAD is the Auto CAD and the Visio for Linux for all practical purposes it implements
all major features of AutoCAD and Visio in such a way that new users (who had ACAD experience before)
do not need any additional training to start working with Linux CAD ).

   Linux CAD can be used in:

       Organizational charts ,

       Business process diagramms,

       Information network and computer system diagrams,

-->    Software Development Flowcharting ,

-->    Entity Relationship Diagramming,

       Network planning,

       System Administration Diagramming and you actually can start
       your sysadmin tasks from inside Linux CAD,

-->    Mechanical Engineering drafting,

       PCB and schematic design ( easily integrated with routing programs ),
       Geographicsl Information Systems,

       Any kind of drafting where integration with database is important,
       Floor plans for buildings and facilities,

-->    Architectural Drafting,

       Front end for programmable rendering systems like OpenGL,

-->    Front end for any software that may require graphics editor functions,

       Can be used to replace ACAD in every application later is used !!!

       Can be used to replace Visio diagramming tool in every application later is used !!!

  AVAILABLE FOR LINUX TODAY !!! TODAY !!! , DELIVERED TO YOUR DOOR WITHIN 24 Hours.

                w  w  w . l i n u x c a d .  c o m
               w w w . s o f t w a r e f o r g e . c o m
                    or call to 913 663 1724

    Create all kinds of technical illustrations , organizational charts and
 any kinds of diagramms with Linux CAD , Linux CAD makes a truly consumer
 oriented OS out of Linux !!!

2. --3DS4--HELP PLEASE

3. 45F357B0__The TOP LINUX APPLICATION

4. Representatives or agents wanted:

5. __The TOP LINUX APPLICATION

6. Defiant 3ds model

7. 45F357B0__The TOP LINUX APPLICATION

8. Bypassing OpenGL transforms & clipping ?

9. __The TOP LINUX APPLICATION

10. 45F357B0__The TOP LINUX APPLICATION

11. __The TOP LINUX APPLICATION

12. 45F357B0__The TOP LINUX APPLICATION

13. __The TOP LINUX APPLICATION