473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Understanding Drawing.Text.TextRenderingHint.SingleBitPerPixel

PictureControl1 is basicly a PictureBox and g is a Graphics object for the
Picturebox.

For large fonts (33) it works OK. For smaler fonts (10) there are touches of
red around the letters.

Maybe antialiasing is doing it.

I tried Drawing.Text.TextRenderingHint.SingleBitPerPixel

Gets rid of the red.

Does that turn off antialiasing?

The text does not look good with SingleBitPerPixel

Anyway better way I can get rid if that extra color?

Thanks

g.Clear(Color.Red)

g.TranslateTransform(PictureControl1.PicWidth / 3, PictureControl1.PicHeight
/ 3)

g.RotateTransform(45)

g.DrawString("Test", New Font("Arial", 10), Brushes.Yellow, 0, 0)

PictureControl1.PicMakeTransparent(Color.Red)
Nov 21 '05 #1
2 2051
* " Just Me" <ne********@a-znet.com> scripsit:
PictureControl1 is basicly a PictureBox and g is a Graphics object for the
Picturebox.

For large fonts (33) it works OK. For smaler fonts (10) there are touches of
red around the letters.

Maybe antialiasing is doing it.


Play around with your 'Graphics' object's 'SmoothingMode' property.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
I did and it looks like SingleBitPerPixel means: Do not use antialiasing.
But looks can be deceiving and I was looking for confirmation.

Thanks

PS I notriced I had SingleBitPerPixel in the subject but not in the body -
I should have included it in the body.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* " Just Me" <ne********@a-znet.com> scripsit:
PictureControl1 is basicly a PictureBox and g is a Graphics object for the Picturebox.

For large fonts (33) it works OK. For smaler fonts (10) there are touches of red around the letters.

Maybe antialiasing is doing it.


Play around with your 'Graphics' object's 'SmoothingMode' property.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Boni | last post by:
Dear all, I have about 500 rectangles on the picturebox, and if I take one with the move and move I MUST clear the whole picture and redraw, which takes about 1-2 second. The rectangles are...
5
by: MarkMurphy | last post by:
Hi, I'm using the code below to create a background and then write some text on it. The area behind the text appears pixelated in the output image. I've tried output to jpeg and gif but result...
20
by: BB | last post by:
Hello all, I am trying to override OnPaint in a custom textbox control (so I can drawstring a caption, etc.). In the code below, I get the "painting the form" message as expected, but not the...
2
by: Lou | last post by:
I need to have a Face,Outline and drop shadow. I am close but can't get my code to work. The face and outline work fine but the shadow is not sized correctly??? Dim rec As New...
0
by: Just Me | last post by:
In control panel/Display/Appearance/Effects I have ClearType selected to smooth screen font edges. I have an LCD display. When I apply that, the display on the screen is better in VS and...
6
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to specify a custom color for disabled text that is used by a class that inherits from ToolStripProfessionalRenderer. The code would look something like this: Public Class MyRenderer...
1
by: =?Utf-8?B?U2t3ZXJs?= | last post by:
I have been unable to draw antialiased text using TextRenderer (although ClearType works just fine, we still need regular antialiased type in some places). Is there a way to generate antialised...
1
by: Eugenio | last post by:
Hi, I'm working in a image generator, using C# with ASP.NET 2.0. I'm generate some imagens in disk , in my machine everything works , but when i put the application in a server prodution , the...
2
by: RSH | last post by:
I have been experimenting with overriding the Paint event on Win Form controls...more specifically trying to force the text to render as Antialiased text. I have not been successful in any of the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.