[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: Splot map and gd.trm bugs (long)
From:       "m sutton" <mws115 () usa ! com>
Date:       2006-12-21 22:49:50
Message-ID: 20061221224951.17D651158CE () ws1-7 ! us4 ! outblaze ! com
[Download RAW message or body]


> ----- Original Message -----
> From: "Ethan A Merritt" <merritt@u.washington.edu>
> To: "m sutton" <mws115@usa.com>
> Subject: Re: Splot map and gd.trm bugs (long)
> Date: Sun, 17 Dec 2006 20:44:59 -0800
> 
> 
> On Sunday 17 December 2006 20:12, m sutton wrote:
> > > > Did you find a specific place where this is not already being done?
> > > Here is a little patch for gd.trm to help keep the character 
> > info syncronized.
> 
> Do you have an actual demo bug that this patch fixes?
> I don't follow why these changes necessary or desirable.
> No text has been printed by either of the code segments you are
> modifying, so I don't see why it is correct to update the variables
> holding the last font used.  After all, the font could easily
> change again before the next text is printed.  Setting the font
> is different from writing a string.
> 

The change is needed because PNG_put_text uses png_state.charh to compute the \
position of text.  The effect of this is most noticeable when using a font different \
from the font used with 'set term png'.  The example below uses TTF fonts.  I have \
used sized to exaggerate the problem.  The label should be centered vertically at 0.  \
Without the fix the bottom of the label is just a hair below zero.  Below is my test \
script.

------
set term x11 persist
set style line 98 lt 1 lw 1 lc rgb 'magenta'
set style line 99 lt -1 lw 3 lc rgb 'cyan'
set grid back ls 98
unset key
set xr [-60:60]
set yr [-60:60]
set border front ls 99
png = 1
if (png > 0) set term png tiny truecolor butt nocrop size 500,500

if (png >0) set out 'plot-gd-font.png'

if (png < 1) set term x11 2

set title "2D PLOT" font "luxirr,8"
set lab 1 "MY LABELXXXXXXXXX" at 0,0 center font "luxirr,24" offset 0,0 front 
plot '-' w p pt 5 ps 1
0 -20
e




-- 
___________________________________________________
Search for products and services at:
http://search.mail.com


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic