FROM: Scott Johnston
DATE: 04/07/2001 01:12:19
SUBJECT: RE: open+save makes resized text wander
Hi --
>
>I have a drawtool document with the following
nasty property: If I read
it in, make a null change (such as creating and
then deleting some irrelevant
object), and then write it out, the new file is
significantly different
from the original. In particular, text that was
originally at point A
has wandered to a new point B.
>
>Every time I save and re-open the document, the
text has wandered farther.
>
>Here is a prescription for reproducibly creating
such a document:
> -- create some 18-point text e.g. "asdf"
> -- draw a rectangle around it
> -- align the centers of the rectangle and text
> -- group the rectangle and text
> -- change the fontsize to 24
> -- ungroup
> -- re-align the centers
> -- re-group
> -- save
> -- re-open and observe text is no longer
centered
>
>Looking at the file (below) it appears that when
the fontsize was changed,
the "gs" statement was updated while the "text"
statement was not. It
seems this has something to do with the problem.
Using a text editor to
change the "18" to a "24" creates a well-behaved
file.
>
>============
>
>In my search for a workaround, I stumbled onto
the following technique.
It sometimes helps, but I can't guarantee it:
> -- export the document in idraw-format
> -- open the idraw version, and use it to
> -- over-write the drawtool version
>
>
>============================================
>
>drawtool(
> gs( :fillbg 1 :brush 65535,2 :fgcolor
"Black",0,0,0 :bgcolor "White",1,1,1
:nonepat),
> gs( :fillbg 0 :fgcolor "Black",0,0,0 :font
"-*-helvetica-bold-r-normal-*-24-*-*-*-*-*-*-*","Helvetica-Bold",24
:graypat 0),
> picture(
> rectangle(164,277,270,341 :gs 0
:transform 1,-0,-0,1,12,33)
> text(18,"asdf" :gs 1 :transform
1,0,0,1,204,345.5)
> )
>)
Looks like a problem updating the datum used for
serializing the text graphic.
Thanks for pointing this out.
You could enter such information yourself directly
into the sourceforge
web pages, but I will incorporate what you have
sent to the mailing list
and me.
Scott Johnston
_______________________________________________
Ivtools-devel mailing list
<EMAIL: PROTECTED>
Logged In: YES
user_id=406
See Also:
http://www.geocrawler.com/lists/3/SourceForge/651/0/5504339/