Solved

Overlapping Text on a Canvas

Posted on 1997-10-08
2
326 Views
Last Modified: 2010-04-03
Whenever I print two lines of text on an Image canvas using TextOut, and the lines overlap, each character of the top line appears to be drawn as a block (i.e. not transparent) so that the line underneath is almost completely obscured.  Does anybody know how to print text "tranparently" so that graphics underneath are not obscured?
0
Comment
Question by:MBaker
[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
2 Comments
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 100 total points
ID: 1347098
Try the following:

SetBkMode(MyCanvas.Handle, TRANSPARENT);
MyCanvas.TextOut(2, 2, 'Base Text');
MyCanvas.TextOut(20, 5, 'Overlapped Text');
SetBkMode(MyCanvas.Handle, OPAQUE);

JB
0
 

Author Comment

by:MBaker
ID: 1347099
Thanks.  Worked great!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

737 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