[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
VG.net Discussion • View topic - PointText

PointText

Report VG.net problems here.

Moderators: Frank Hileman, Anne Szyjan

PointText

Postby euanw » Mon May 15, 2017 5:40 am

Hi,
I'm trying to draw some text in my picture, I normally use a Rectangle and set the Text property, but this time I don't want a background to the text. What should I use? I also don't want a border, so setting the DrawStyle of the Rectangle to Edge isn't any good. I tried a PointText, but the font is all horrible, couldn't work out why.
I've attached the file showing the result using PointText. When I use a Rectangle with Text it looks nice

var label = new PointText();
label.Location = picture.PointDeviceToElement(new Vector(distanceFromLeftToRuler - tickLineLength - 10, heightInPixels));
label.Text = HTMLtoRTF.ConvertToUnicode(value);
label.TextAppearance = new Prodige.Drawing.Styles.TextAppearance() { SizeUnit = System.Drawing.GraphicsUnit.Millimeter, Size = 3f / picture.Scaling.X };
label.TextAppearance.HorizontalAlignment = System.Drawing.StringAlignment.Far;
label.TextAppearance.VerticalAlignment = System.Drawing.StringAlignment.Center;

What am I doing wrong?

Thanks,

Euan
Attachments
PointText problem.PNG
PointText problem.PNG (4.26 KiB) Viewed 20835 times
euanw
 
Posts: 19
Joined: Thu Oct 07, 2004 9:41 am

Re: PointText

Postby Frank Hileman » Tue May 16, 2017 9:07 am

Frank Hileman
User avatar
Frank Hileman
Site Admin
 
Posts: 1399
Joined: Sun Jul 25, 2004 8:16 pm
Location: California

Re: PointText

Postby Frank Hileman » Tue May 16, 2017 9:37 am

Hello Euan,

I could not reproduce the problem. I did note you are using Millimeters as a size unit. This is rare. I don't know if there is any bug with this unit, but world coordinates are generally the best unit, as they are independent of DPI.

Regards,
Frank Hileman
User avatar
Frank Hileman
Site Admin
 
Posts: 1399
Joined: Sun Jul 25, 2004 8:16 pm
Location: California

Re: PointText

Postby euanw » Thu May 18, 2017 4:01 am

Hi Frank,

yes, it seemed to be related to the Millimeters size unit. All ok now

thanks,

Euan
euanw
 
Posts: 19
Joined: Thu Oct 07, 2004 9:41 am


Return to Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron