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
Solved

Overlapping Text on a Canvas

Posted on 1997-10-08
2
317 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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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