Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

svg-developers · SVG Developers

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 8776
  • Category: Data Formats
  • Founded: Aug 16, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 1027 - 1056 of 66120   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1027 From: "antoine j. quint, esq." <antoine@...>
Date: Mon Nov 6, 2000 3:54 pm
Subject: <tspan> again
antoine@...
Send Email Send Email
 
hello!

svgdoc.getElementById(textZone).getFirstChild().data = 'a new string';

I found out that this works but strangely I cannot do this

svgdoc.getElementById(textZone).getFirstChild().deleteData() or any other
CharacterData methods for that matter.

Anybody knows how to use the CharacterData methods? thank you!

antoine
____________________________________________________________________________

Antoine Quint <antoine@...>
XML developer / SVG designer
+33 6 03 11 21 23 mobile

k n o w s c a p e : // www.knowscape.com

Knowscape LLC - 151 1st Avenue, Suite 68 - New York, NY 10003 - USA
+1 212 504 8168 tel
+1 212 202 7700 fax

Knowscape SARL - 9ter, rue Auguste Barbier - 75011 Paris - France
+33 1 42 01 00 07 tel
+33 1 43 57 23 47 fax
____________________________________________________________________________

#1028 From: "Jasen Jacobsen" <jasenj1@...>
Date: Mon Nov 6, 2000 4:00 pm
Subject: Re: changing <tspan> value
jasenj1@...
Send Email Send Email
 
--- In svg-developers@egroups.com, "antoine j. quint, esq."
<antoine@g...> wrote:
> hello,
>
> I'm having a bit of a problem trying to change the text data inside
of a
> <tspan> element through the DOM.

You can check the JavaScript #2 at the demo/tutorial I set up at
http://www.xfront.org/svgdemo.  I do this in there.

Essentially, you don't change the tspan, you change the text node
that is a child of the tspan, like this:

		 tspanChildren = textChild.getElementsByTagName
("tspan");

		 if (tspanChildren == null)
		 {
			 // Couldn't find any <tspan>s, so can't
continue.
			 return null;
		 }

		 if (tspanChildren.item((x*3)+2).firstChild != null)
		 {
			 tspanChildren.item((x*3)
+2).firstChild.nodeValue = currValue;
		 } else {
		 // We need to add a text node to the <tspan>

			 newNode = svgdoc.createTextNode(currValue);
			 tspanChildren.item((x*3)+2).appendChild
(newNode);
		 }

In the above, firstChild is the text node where the data actually is.

For deleting, you could delete the whole tspan, or it may be enough
to delete the text node that is its child.

           - Jasen.

#1029 From: "Harrell, Wade" <wade@...>
Date: Mon Nov 6, 2000 4:56 pm
Subject: RE: Re: changing <tspan> value
wade@...
Send Email Send Email
 
Deleting the data child of the tspan seems to be a bit of overkill.  Why not
just set it == '' ?  So:

svgdoc.getElementById(textZone).getFirstChild().data = '';


Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: Jasen Jacobsen [mailto:jasenj1@...]
Sent: Monday, November 06, 2000 11:01 AM
To: svg-developers@egroups.com
Subject: [svg-developers] Re: changing <tspan> value


--- In svg-developers@egroups.com, "antoine j. quint, esq."
<antoine@g...> wrote:
> hello,
>
> I'm having a bit of a problem trying to change the text data inside
of a
> <tspan> element through the DOM.

You can check the JavaScript #2 at the demo/tutorial I set up at
http://www.xfront.org/svgdemo.  I do this in there.

Essentially, you don't change the tspan, you change the text node
that is a child of the tspan, like this:

		 tspanChildren = textChild.getElementsByTagName
("tspan");

		 if (tspanChildren == null)
		 {
			 // Couldn't find any <tspan>s, so can't
continue.
			 return null;
		 }

		 if (tspanChildren.item((x*3)+2).firstChild != null)
		 {
			 tspanChildren.item((x*3)
+2).firstChild.nodeValue = currValue;
		 } else {
		 // We need to add a text node to the <tspan>

			 newNode = svgdoc.createTextNode(currValue);
			 tspanChildren.item((x*3)+2).appendChild
(newNode);
		 }

In the above, firstChild is the text node where the data actually is.

For deleting, you could delete the whole tspan, or it may be enough
to delete the text node that is its child.

           - Jasen.

#1030 From: "Steve White" <steve@...>
Date: Mon Nov 6, 2000 5:21 pm
Subject: stretched outline
steve@...
Send Email Send Email
 
I notice that when you transform (stretch) an element, it stretches the
outline. ex: http://www.virtualmechanics.com/test/stretch.svg I don't
suppose there is any simple way to prevent this?

Yours Truly

Steve White
steve@...
www.VirtualMechanics.com

#1031 From: "Harrell, Wade" <wade@...>
Date: Mon Nov 6, 2000 6:39 pm
Subject: RE: stretched outline
wade@...
Send Email Send Email
 
This is a good question.  In a few experiments I have been doing with the
file you linked I have been unable to apply a stroke to a scaled object
without that stroke being scaled as well.  This poses a problem for
instances where increasing the stroke-width on scale is undesirable.

Does anyone else on the list have any insight into a solution for locking
the stroke-width regardless of the scale?

Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: Steve White [mailto:steve@...]
Sent: Monday, November 06, 2000 12:21 PM
To: svg-developers@egroups.com
Subject: [svg-developers] stretched outline


I notice that when you transform (stretch) an element, it stretches the
outline. ex: http://www.virtualmechanics.com/test/stretch.svg I don't
suppose there is any simple way to prevent this?

Yours Truly

Steve White
steve@...
www.VirtualMechanics.com

#1032 From: carnold@...
Date: Mon Nov 6, 2000 9:06 pm
Subject: Re: Visio and Svg
carnold@...
Send Email Send Email
 
You can export a Visio drawing to Windows Metafile (.wmf) and then
use the .wmf to .svg converter at http://www.graphicservlets.com.  It
has been hit and miss, but it does work sometimes (other times it
gives a null pointer exception or stalls).

#1033 From: goessner@...
Date: Mon Nov 6, 2000 9:34 pm
Subject: Re: stretched outline
goessner@...
Send Email Send Email
 
some time ago i asked a similar question .. resolved by chris ..

http://www.egroups.com/message/svg-developers/329

hope that helps ..

s.goessner

--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> This is a good question.  In a few experiments I have been doing
with the
> file you linked I have been unable to apply a stroke to a scaled
object
> without that stroke being scaled as well.  This poses a problem for
> instances where increasing the stroke-width on scale is undesirable.
>
> Does anyone else on the list have any insight into a solution for
locking
> the stroke-width regardless of the scale?
>
> Wade Harrell * Wade.Harrell@i...
> Sr Content Engineer * Iguana Studios Inc
> vox:212.209.1380 * fax:212.243.6506
> 16 W 19th * 10th Floor
> New York, NY 10011 - 4205
> http://www.iguanastudios.com
> Latitude: 40.739145  (40° 44' 20" N)
> Longitude: -73.992089  (73° 59' 31" W)
>
> -----Original Message-----
> From: Steve White [mailto:steve@V...]
> Sent: Monday, November 06, 2000 12:21 PM
> To: svg-developers@egroups.com
> Subject: [svg-developers] stretched outline
>
>
> I notice that when you transform (stretch) an element, it stretches
the
> outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
don't
> suppose there is any simple way to prevent this?
>
> Yours Truly
>
> Steve White
> steve@V...
> www.VirtualMechanics.com

#1034 From: "antoine j. quint, esq." <antoine@...>
Date: Mon Nov 6, 2000 9:33 pm
Subject: DOM access to style property
antoine@...
Send Email Send Email
 
Hello,

I've got this bit of SVG code

       <path id="fond_menu2" style="fill:#1989BC;stroke:none;" d=" "/>

and I want to get the fill-color of this element through a DOM interface in
my HTML file containing this SVG document. I have found this method called
getPropertyCSSValue() that I tried to use this way:

svgdoc.getElementById('fond_menu2')getStyle().getPropertyCSSValue('fill')

This does not work. The release notes for the SVG viewer say that it is not
implement, but those notes date back from April and the current release of
the Adobe viewer is more recent if I'm not mistaken (maybe I am).

Maybe someone knows how to access a set CSS property value. Thanks!

antoine
____________________________________________________________________________

Antoine Quint <antoine@...>
XML developer / SVG designer
+33 6 03 11 21 23 mobile

k n o w s c a p e : // www.knowscape.com

Knowscape LLC - 151 1st Avenue, Suite 68 - New York, NY 10003 - USA
+1 212 504 8168 tel
+1 212 202 7700 fax

Knowscape SARL - 9ter, rue Auguste Barbier - 75011 Paris - France
+33 1 42 01 00 07 tel
+33 1 43 57 23 47 fax
____________________________________________________________________________

#1035 From: "Cathy O'Connor" <Cathy.OConnor@...>
Date: Mon Nov 6, 2000 9:48 pm
Subject: SVG to graphic image file
Cathy.OConnor@...
Send Email Send Email
 
Is there a plug-in or utility that a user can rely on to convert an
SVG image to a graphic image (jpeg, tiff, bmp) which could be placed
in Word or Pagemaker or some other word processing/publishing tool?
I plan to provide maps on a website but I'm sure the users will want
to save the maps as images that can be used later.

Thanks,
Cathy

#1036 From: "Peter Sorotokin" <sorotokin@...>
Date: Mon Nov 6, 2000 9:54 pm
Subject: Re: SVG to graphic image file
sorotokin@...
Send Email Send Email
 
--- In svg-developers@egroups.com, "Cathy O'Connor"
<Cathy.OConnor@d...> wrote:
> Is there a plug-in or utility that a user can rely on to convert an
> SVG image to a graphic image (jpeg, tiff, bmp) which could be
placed
> in Word or Pagemaker or some other word processing/publishing
tool?
> I plan to provide maps on a website but I'm sure the users will
want
> to save the maps as images that can be used later.
>
> Thanks,
> Cathy

If they select "Copy SVG" from the Adobe SVG plugin menu, they
can paste it into their app. They should paste "as image",
not "as text", though, if app can paste in both formats.

Peter

#1037 From: Martin Girschick <magir@...>
Date: Mon Nov 6, 2000 11:07 pm
Subject: Modifying css-style from javascript
magir@...
Send Email Send Email
 
Hi,

I try to hide a few objects in an svg-picture thru javascript:

node.setAttribute('style', 'visiblity:hidden');

The problem is that when I bring back to object the other styles
applied to it are gone (which is an obvious behaviour). How can I add
additional styles to an object?

Thanx in advance,

Martin

#1038 From: Tobias Reif <tobiasreif@...>
Date: Tue Nov 7, 2000 12:04 am
Subject: (No subject)
tobiasreif@...
Send Email Send Email
 
... it would be great if the adobeViewer would support
full Xpointer.

"I want to animate the fifth rect in the group with ID
'checkers'"
or
"I would like point to the second children of the
second SVG-element"

not just
"#xpointer(id('MyView'))"
wich is equivalent to
"#[id]"

Tobi

=====
Tobias Reif  http://www.pinkjuice.com/svg/  http://www.pinkjuice.com/
        _/  /
      /    /    _   /   _  /   _  /  /   /   _  /   _  /   _  /
      _/  /    /   /  /   /  /   /  /   /  /   /  /   /  /   /
    /   _ _/ _ _ _/   _ _/   _ _/ _ _  /   _ _/   _ _/   _ _/
  _/                /      /     _ _ _/  /             /

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/

#1039 From: "Harrell, Wade" <wade@...>
Date: Tue Nov 7, 2000 12:15 am
Subject: RE: Re: stretched outline
wade@...
Send Email Send Email
 
hmmmm, maybe I am seeing an issue with the Adobe viewer then.  I tried all
three examples from that post and all three gave the same result.  A
rectangle with 1px left & right but approx 10px top and bottom.

Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: goessner@... [mailto:goessner@...]
Sent: Monday, November 06, 2000 4:34 PM
To: svg-developers@egroups.com
Subject: [svg-developers] Re: stretched outline


some time ago i asked a similar question .. resolved by chris ..

http://www.egroups.com/message/svg-developers/329

hope that helps ..

s.goessner

--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> This is a good question.  In a few experiments I have been doing
with the
> file you linked I have been unable to apply a stroke to a scaled
object
> without that stroke being scaled as well.  This poses a problem for
> instances where increasing the stroke-width on scale is undesirable.
>
> Does anyone else on the list have any insight into a solution for
locking
> the stroke-width regardless of the scale?
>
> Wade Harrell * Wade.Harrell@i...
> Sr Content Engineer * Iguana Studios Inc
> vox:212.209.1380 * fax:212.243.6506
> 16 W 19th * 10th Floor
> New York, NY 10011 - 4205
> http://www.iguanastudios.com
> Latitude: 40.739145  (40° 44' 20" N)
> Longitude: -73.992089  (73° 59' 31" W)
>
> -----Original Message-----
> From: Steve White [mailto:steve@V...]
> Sent: Monday, November 06, 2000 12:21 PM
> To: svg-developers@egroups.com
> Subject: [svg-developers] stretched outline
>
>
> I notice that when you transform (stretch) an element, it stretches
the
> outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
don't
> suppose there is any simple way to prevent this?
>
> Yours Truly
>
> Steve White
> steve@V...
> www.VirtualMechanics.com

#1040 From: "Amino-X" <kj5nh@...>
Date: Tue Nov 7, 2000 3:02 am
Subject: Re: Re: SVG to graphic image file
kj5nh@...
Send Email Send Email
 
<Cathy.OConnor@d...> wrote:
> Is there a plug-in or utility that a user can rely on to convert an
  > SVG image to a graphic image (jpeg, tiff, bmp) which could be
> placed
> > in Word or Pagemaker or some other word processing/publishing
> tool?
  > I plan to provide maps on a website but I'm sure the users will
> want
  > to save the maps as images that can be used later.
> >
  > Thanks,
  > Cathy
>
> If they select "Copy SVG" from the Adobe SVG plugin menu, they
> can paste it into their app. They should paste "as image",
> not "as text", though, if app can paste in both formats.
>
> Peter

Or your user can just hit the "Print Screen" button.  This will save the
whole page to the clipboard which can then be cropped in a program like
Paint Shop Pro.  This is a longer way around than Peters suggestion, but it
works. :)

Amino-X
kj5nh@...

#1041 From: "Amino-X" <kj5nh@...>
Date: Tue Nov 7, 2000 5:47 am
Subject: Scroll Bars
kj5nh@...
Send Email Send Email
 
Nothing spectacular, just a fun implementation. :)

http://www2.arkansas.net/~aminox

Amino-X
kj5nh@...
Using MSIE 5.0  and Adobe SVG viewer

#1042 From: goessner@...
Date: Tue Nov 7, 2000 7:22 am
Subject: Re: stretched outline
goessner@...
Send Email Send Email
 
wade,
.. i remember .. i also considered something wrong with adobe
viewer's result. maybe someone of adobes developers crew can comment
this ..

s.goessner

--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> hmmmm, maybe I am seeing an issue with the Adobe viewer then.  I
tried all
> three examples from that post and all three gave the same result.  A
> rectangle with 1px left & right but approx 10px top and bottom.
>
> Wade Harrell * Wade.Harrell@i...
> Sr Content Engineer * Iguana Studios Inc
> vox:212.209.1380 * fax:212.243.6506
> 16 W 19th * 10th Floor
> New York, NY 10011 - 4205
> http://www.iguanastudios.com
> Latitude: 40.739145  (40° 44' 20" N)
> Longitude: -73.992089  (73° 59' 31" W)
>
> -----Original Message-----
> From: goessner@m... [mailto:goessner@m...]
> Sent: Monday, November 06, 2000 4:34 PM
> To: svg-developers@egroups.com
> Subject: [svg-developers] Re: stretched outline
>
>
> some time ago i asked a similar question .. resolved by chris ..
>
> http://www.egroups.com/message/svg-developers/329
>
> hope that helps ..
>
> s.goessner
>
> --- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...>
wrote:
> > This is a good question.  In a few experiments I have been doing
> with the
> > file you linked I have been unable to apply a stroke to a scaled
> object
> > without that stroke being scaled as well.  This poses a problem
for
> > instances where increasing the stroke-width on scale is
undesirable.
> >
> > Does anyone else on the list have any insight into a solution for
> locking
> > the stroke-width regardless of the scale?
> >
> > Wade Harrell * Wade.Harrell@i...
> > Sr Content Engineer * Iguana Studios Inc
> > vox:212.209.1380 * fax:212.243.6506
> > 16 W 19th * 10th Floor
> > New York, NY 10011 - 4205
> > http://www.iguanastudios.com
> > Latitude: 40.739145  (40° 44' 20" N)
> > Longitude: -73.992089  (73° 59' 31" W)
> >
> > -----Original Message-----
> > From: Steve White [mailto:steve@V...]
> > Sent: Monday, November 06, 2000 12:21 PM
> > To: svg-developers@egroups.com
> > Subject: [svg-developers] stretched outline
> >
> >
> > I notice that when you transform (stretch) an element, it
stretches
> the
> > outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
> don't
> > suppose there is any simple way to prevent this?
> >
> > Yours Truly
> >
> > Steve White
> > steve@V...
> > www.VirtualMechanics.com

#1043 From: Mika Heiskanen <Mika.Heiskanen@...>
Date: Sun Nov 12, 2000 10:41 am
Subject: Re: Re: stretched outline
Mika.Heiskanen@...
Send Email Send Email
 
> This is a good question.  In a few experiments I have been doing
> with the file you linked I have been unable to apply a stroke to
> a scaled object without that stroke being scaled as well.
> This poses a problem for instances where increasing the stroke-width
> on scale is undesirable.

Stroke-width did increase in any viewer in accorance with the
previous SVG specification. This because the specification
required using the nearest viewport definition in calculating
what 1px means. The form of the calculation was such that the
definition of 1px depends on sx and sy, the scale factors in
x- and y-directions.

The latest SVG specification has changed so that going back
to viewport coordinates and back is no longer necessary. However,
the list of changes clearly implies this is not enough to obtain
invariance across zoom levels, but more language features will
be needed in the future. Why, I am not certain. I had previously
thought removing the step to viewport and back would be enough to
obtain (nonuniform) scale invariant absolute units.

Here is the relevant clip from

    http://www.w3.org/TR/2000/CR-SVG-20001102/changes.html

"Based on feedback from implementers that the absolute and percentage CSS
units specifiers were very difficult to implement and would cause major
impact on performance, and with the observation that the processing rules
for CSS units produced considerable confusion in the user community and
often did not produce the results users expected, the CSS unit processing
rules have been revamped to enable simpler implementation, faster
processing and more predictable behavior. With the new CSS unit
processing rules, an implementation no longer will have to bubble up to the
nearest viewport element and perform major computation to determine how
large "1px" is. The intent behind the old rules was to allow for certain
parts of the graphic (e.g., stroke widths or font sizes) to be invariant
across zoom levels, but the previous CSS unit processing rules did an
incomplete job of addressing these needs. The feeling is that the ability
to achieve invariance requires a more thorough feature set which will be
considered in a future version of the language. For now, developers will
have to use scripting to achieve invariance across zoom levels."

The new definition in

    http://www.w3.org/TR/2000/CR-SVG-20001102/coords.html

refers to CSS2 processing rules, which in my understanding define
a visual pixel unit, which to my understanding should be invariant
under any transform operations. I am not quite sure why the new
specs then warn against using absolute units when transformations
are in effect. I had thought the whole idea of using absolute units
was to avoid any coordinate transformation effects on size.

Perhaps someone more knowledgeable on the matter could explain
what the end result is going to be?

--> Mika.Heiskanen@...

#1044 From: carlos.montalvillo@...
Date: Tue Nov 7, 2000 8:42 am
Subject: How can avoid to show the main menu ?
carlos.montalvillo@...
Send Email Send Email
 
Hi all,

    I would like to know if it is
possible to avoid browser to show
the main menu :

    - View Source
    - Save SVG as...
    - Zoom In
    - Zoom Out

    Thanks in advance.

    Carlos
    ------

#1045 From: "Jasen Jacobsen" <jasenj1@...>
Date: Tue Nov 7, 2000 3:50 pm
Subject: Re: changing <tspan> value
jasenj1@...
Send Email Send Email
 
--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> Deleting the data child of the tspan seems to be a bit of
overkill.  Why not
> just set it == '' ?  So:
>
> svgdoc.getElementById(textZone).getFirstChild().data = '';

Because if you hand-code or programmically generate the svg you end
up with tspans that look like <tspan/>.  There is no child node.

      - Jasen.

#1046 From: "Cathy O'Connor" <Cathy.OConnor@...>
Date: Tue Nov 7, 2000 4:45 pm
Subject: Re: SVG to graphic image file
Cathy.OConnor@...
Send Email Send Email
 
I followed the steps and pasted first a bitmap image into WORD and
then a "Device Independent Bitmap".  Neither is exactly the way it
looked on the web page.  The bitmap has taken a few pixels from the
top left of the image and displayed them on the top right edge of the
image, but it is the same size and clarity as on the web page.
The "Device Independent Bitmap" is larger and blury.  I'll see if
shifting the title (that's what is at the top left) to the right a
bit will eliminate the pixel shifting.
Thanks for the info,
Cathy

--- In svg-developers@egroups.com, "Peter Sorotokin" <sorotokin@y...>
wrote:
> --- In svg-developers@egroups.com, "Cathy O'Connor"
> <Cathy.OConnor@d...> wrote:
> > Is there a plug-in or utility that a user can rely on to convert
an
> > SVG image to a graphic image (jpeg, tiff, bmp) which could be
> placed
> > in Word or Pagemaker or some other word processing/publishing
> tool?
> > I plan to provide maps on a website but I'm sure the users will
> want
> > to save the maps as images that can be used later.
> >
> > Thanks,
> > Cathy
>
> If they select "Copy SVG" from the Adobe SVG plugin menu, they
> can paste it into their app. They should paste "as image",
> not "as text", though, if app can paste in both formats.
>
> Peter

#1047 From: "Jon Ferraiolo" <jferraio@...>
Date: Tue Nov 7, 2000 5:21 pm
Subject: Re: Re: stretched outline
jferraio@...
Send Email Send Email
 
There has been an email thread which I haven't had time to respond to until
now about maintaining constant stroke width when enclosed by a non-uniform
transformation. For example:

<svg>
<g transform="scale(2 1)">
     <circle cx="30" cy="30" r="20" style="fill:none; stroke:black;
stroke-width:3"/>
</g>
</svg>

People have observed that the stroke is non-uniform in the above case with
the Adobe viewer. That is correct behavior. When Chris responded a long
time ago on this subject, he responded incorrectly. Chris and I exchanged
email on this at the time. I thought a correction was posted, but maybe it
wasn't.

Think of things as follows. The rendering of any given object (for example,
the circle above) is performed as if the object had no knowledge about any
enclosing transformations into its own local coordinate system, which looks
to the object as if it were a Cartesian coordinate system with "square"
units. (That is, one unit in X looks to be the same size as one unit in Y.)
Thus, in the local coordinate system, the circle looks circular, and the
strokes is the same width throughout.

However, because there is a non-uniform scale transformation around the
circle, the circle and its stroke get stretched. Thus, the circle turns
into an ellipse, and the stroke of the circle also gets stretched similarly
and appears with non-uniform thickness.

Conceptually, stroke is really just a shorthand for another fill. A stroke
is done by converting the outline of the stroke into a new graphic object
and then filling that outline just as if it were a graphic object. Thus,
transformations apply to strokes just as they apply to graphics.

In the above example, to stretch the circle into an ellipse but have a
constant stroke width on that ellipse, you have to change the coordinates
of the circle/ellipse instead of enclosing the object with a
transformation. For example:

     <ellipse cx="60" cy="30" rx="40" ry="20" style="fill:none;
stroke:black; stroke-width:3"/>

There has also been discussion about CSS units perhaps "helping'". They
don't. CSS units have no effect on this issue. The rule in the SVG spec has
always been that CSS units get converted into equivalent user units using
some magic formulas, and then all rendering is done as if the equivalent
user units had been specified.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 07:22 AM 11/7/00 +0000, goessner@... wrote:
>wade,
>.. i remember .. i also considered something wrong with adobe
>viewer's result. maybe someone of adobes developers crew can comment
>this ..
>
>s.goessner
>
>--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> > hmmmm, maybe I am seeing an issue with the Adobe viewer then.  I
>tried all
> > three examples from that post and all three gave the same result.  A
> > rectangle with 1px left & right but approx 10px top and bottom.
> >
> > Wade Harrell * Wade.Harrell@i...
> > Sr Content Engineer * Iguana Studios Inc
> > vox:212.209.1380 * fax:212.243.6506
> > 16 W 19th * 10th Floor
> > New York, NY 10011 - 4205
> > http://www.iguanastudios.com
> > Latitude: 40.739145  (40° 44' 20" N)
> > Longitude: -73.992089  (73° 59' 31" W)
> >
> > -----Original Message-----
> > From: goessner@m... [mailto:goessner@m...]
> > Sent: Monday, November 06, 2000 4:34 PM
> > To: svg-developers@egroups.com
> > Subject: [svg-developers] Re: stretched outline
> >
> >
> > some time ago i asked a similar question .. resolved by chris ..
> >
> > http://www.egroups.com/message/svg-developers/329
> >
> > hope that helps ..
> >
> > s.goessner
> >
> > --- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...>
>wrote:
> > > This is a good question.  In a few experiments I have been doing
> > with the
> > > file you linked I have been unable to apply a stroke to a scaled
> > object
> > > without that stroke being scaled as well.  This poses a problem
>for
> > > instances where increasing the stroke-width on scale is
>undesirable.
> > >
> > > Does anyone else on the list have any insight into a solution for
> > locking
> > > the stroke-width regardless of the scale?
> > >
> > > Wade Harrell * Wade.Harrell@i...
> > > Sr Content Engineer * Iguana Studios Inc
> > > vox:212.209.1380 * fax:212.243.6506
> > > 16 W 19th * 10th Floor
> > > New York, NY 10011 - 4205
> > > http://www.iguanastudios.com
> > > Latitude: 40.739145  (40° 44' 20" N)
> > > Longitude: -73.992089  (73° 59' 31" W)
> > >
> > > -----Original Message-----
> > > From: Steve White [mailto:steve@V...]
> > > Sent: Monday, November 06, 2000 12:21 PM
> > > To: svg-developers@egroups.com
> > > Subject: [svg-developers] stretched outline
> > >
> > >
> > > I notice that when you transform (stretch) an element, it
>stretches
> > the
> > > outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
> > don't
> > > suppose there is any simple way to prevent this?
> > >
> > > Yours Truly
> > >
> > > Steve White
> > > steve@V...
> > > www.VirtualMechanics.com
>
>
>

#1048 From: "Harrell, Wade" <wade@...>
Date: Tue Nov 7, 2000 5:25 pm
Subject: RE: Re: stretched outline
wade@...
Send Email Send Email
 
ok.  For a Circle the solution is as you have shown.  How would you
recommend keeping a constant stroke on a path that is enclosed by a
non-uniform transformation?  This is the problem.  Trying to allow users to
resize elements without changing the stroke width.  So they can have a path
that is three times as wide and twice as tall as the original but still
maintaining the original stroke width.

For a uniform scale I suspect I could build a script that will adjust the
stroke-width appropriately.

Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: Jon Ferraiolo [mailto:jferraio@...]
Sent: Tuesday, November 07, 2000 12:21 PM
To: svg-developers@egroups.com
Subject: Re: [svg-developers] Re: stretched outline


There has been an email thread which I haven't had time to respond to until
now about maintaining constant stroke width when enclosed by a non-uniform
transformation. For example:

<svg>
<g transform="scale(2 1)">
     <circle cx="30" cy="30" r="20" style="fill:none; stroke:black;
stroke-width:3"/>
</g>
</svg>

People have observed that the stroke is non-uniform in the above case with
the Adobe viewer. That is correct behavior. When Chris responded a long
time ago on this subject, he responded incorrectly. Chris and I exchanged
email on this at the time. I thought a correction was posted, but maybe it
wasn't.

Think of things as follows. The rendering of any given object (for example,
the circle above) is performed as if the object had no knowledge about any
enclosing transformations into its own local coordinate system, which looks
to the object as if it were a Cartesian coordinate system with "square"
units. (That is, one unit in X looks to be the same size as one unit in Y.)
Thus, in the local coordinate system, the circle looks circular, and the
strokes is the same width throughout.

However, because there is a non-uniform scale transformation around the
circle, the circle and its stroke get stretched. Thus, the circle turns
into an ellipse, and the stroke of the circle also gets stretched similarly
and appears with non-uniform thickness.

Conceptually, stroke is really just a shorthand for another fill. A stroke
is done by converting the outline of the stroke into a new graphic object
and then filling that outline just as if it were a graphic object. Thus,
transformations apply to strokes just as they apply to graphics.

In the above example, to stretch the circle into an ellipse but have a
constant stroke width on that ellipse, you have to change the coordinates
of the circle/ellipse instead of enclosing the object with a
transformation. For example:

     <ellipse cx="60" cy="30" rx="40" ry="20" style="fill:none;
stroke:black; stroke-width:3"/>

There has also been discussion about CSS units perhaps "helping'". They
don't. CSS units have no effect on this issue. The rule in the SVG spec has
always been that CSS units get converted into equivalent user units using
some magic formulas, and then all rendering is done as if the equivalent
user units had been specified.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 07:22 AM 11/7/00 +0000, goessner@... wrote:
>wade,
>.. i remember .. i also considered something wrong with adobe
>viewer's result. maybe someone of adobes developers crew can comment
>this ..
>
>s.goessner
>
>--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> > hmmmm, maybe I am seeing an issue with the Adobe viewer then.  I
>tried all
> > three examples from that post and all three gave the same result.  A
> > rectangle with 1px left & right but approx 10px top and bottom.
> >
> > Wade Harrell * Wade.Harrell@i...
> > Sr Content Engineer * Iguana Studios Inc
> > vox:212.209.1380 * fax:212.243.6506
> > 16 W 19th * 10th Floor
> > New York, NY 10011 - 4205
> > http://www.iguanastudios.com
> > Latitude: 40.739145  (40° 44' 20" N)
> > Longitude: -73.992089  (73° 59' 31" W)
> >
> > -----Original Message-----
> > From: goessner@m... [mailto:goessner@m...]
> > Sent: Monday, November 06, 2000 4:34 PM
> > To: svg-developers@egroups.com
> > Subject: [svg-developers] Re: stretched outline
> >
> >
> > some time ago i asked a similar question .. resolved by chris ..
> >
> > http://www.egroups.com/message/svg-developers/329
> >
> > hope that helps ..
> >
> > s.goessner
> >
> > --- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...>
>wrote:
> > > This is a good question.  In a few experiments I have been doing
> > with the
> > > file you linked I have been unable to apply a stroke to a scaled
> > object
> > > without that stroke being scaled as well.  This poses a problem
>for
> > > instances where increasing the stroke-width on scale is
>undesirable.
> > >
> > > Does anyone else on the list have any insight into a solution for
> > locking
> > > the stroke-width regardless of the scale?
> > >
> > > Wade Harrell * Wade.Harrell@i...
> > > Sr Content Engineer * Iguana Studios Inc
> > > vox:212.209.1380 * fax:212.243.6506
> > > 16 W 19th * 10th Floor
> > > New York, NY 10011 - 4205
> > > http://www.iguanastudios.com
> > > Latitude: 40.739145  (40° 44' 20" N)
> > > Longitude: -73.992089  (73° 59' 31" W)
> > >
> > > -----Original Message-----
> > > From: Steve White [mailto:steve@V...]
> > > Sent: Monday, November 06, 2000 12:21 PM
> > > To: svg-developers@egroups.com
> > > Subject: [svg-developers] stretched outline
> > >
> > >
> > > I notice that when you transform (stretch) an element, it
>stretches
> > the
> > > outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
> > don't
> > > suppose there is any simple way to prevent this?
> > >
> > > Yours Truly
> > >
> > > Steve White
> > > steve@V...
> > > www.VirtualMechanics.com
>
>
>

#1049 From: Martin Girschick <magir@...>
Date: Tue Nov 7, 2000 5:07 pm
Subject: How to access SVG thru a Java-Applet
magir@...
Send Email Send Email
 
Hi,

I searched the documentation for it, but I couldn't find anything. I
want to open an svg-image with a java-applet and then add some nodes
to it, if someone could give me a few lines of how to do this - would
be great!

Thanx,

Martin

P.S. Is there a javadoc for the SVGViewer-Classes?

#1050 From: Martin Girschick <magir@...>
Date: Tue Nov 7, 2000 5:09 pm
Subject: Reference Card for SVG-Syntax?
magir@...
Send Email Send Email
 
Hello again,

I'm currently writing a small html-file as a reference to the syntax
of svg. It's more a less a very short version of the specs. Perhaps
anyone else already did something like this? The specs are not very
short and I only have about 10% of it...

Regards,

Martin

#1051 From: Martin Girschick <magir@...>
Date: Tue Nov 7, 2000 5:36 pm
Subject: Re: Adobe SVG Print
magir@...
Send Email Send Email
 
When we talk about printing: Try to print the following svg:

<svg width="20cm" height="15cm">
<rect x="16.41cm" y="2cm" height="11.7cm" width="0.6cm"
style="stroke-width:0.1mm; fill:none; stroke:gray"/>
<g transform="translate(2.2cm 2.5cm) rotate(90)" style
="font-family:Verdana; font-size:14pt">
<text x="0cm" y="-14.35cm">Cover</text>
</g>
</svg>

At least on my Mac (IE and NC) the Text is printed at the wrong position.

Hopefully a future version of the Adobe-SVG-Plugin resolves this
(nice to hear that some functionality will be borrowed from Acrobat).

Regards,

Martin

#1052 From: "New, Cecil (GEAE)" <Cecil.New@...>
Date: Tue Nov 7, 2000 6:08 pm
Subject: unsubscribe
Cecil.New@...
Send Email Send Email
 
unsubscribe

#1053 From: "Steve White" <steve@...>
Date: Tue Nov 7, 2000 7:24 pm
Subject: RE: Re: stretched outline
steve@...
Send Email Send Email
 
I think the issue here is whether a transform is a valid way to create
geometry. I have certainly used it that way for a long time. It becomes more
relevant when working in 3D or Solid Modeling; performing extrusions,
Boolean editing etc. If you cannot maintain a consistent outline it would be
impossible to use these operations for complex modal building. Wire
Frame/Hidden Surface projections for example, would be unworkable. 2D is
really no different. We use 2D stretch, rotate and move extrusions to build
complex geometry. Variable stroke widths will produce undesirable effects.

I for one think that a mechanism is needed to set an absolute stroke width.
I thought the method posted at:
http://www.egroups.com/message/svg-developers/329 was quite an elegant
solution.

Yours Truly

Steve
steve@...
www.VirtualMechanics.com

-----Original Message-----
From: Harrell, Wade [mailto:wade@...]
Sent: Tuesday, November 07, 2000 12:26 PM
To: 'svg-developers@egroups.com'
Subject: RE: [svg-developers] Re: stretched outline


ok.  For a Circle the solution is as you have shown.  How would you
recommend keeping a constant stroke on a path that is enclosed by a
non-uniform transformation?  This is the problem.  Trying to allow users to
resize elements without changing the stroke width.  So they can have a path
that is three times as wide and twice as tall as the original but still
maintaining the original stroke width.

For a uniform scale I suspect I could build a script that will adjust the
stroke-width appropriately.

Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: Jon Ferraiolo [mailto:jferraio@...]
Sent: Tuesday, November 07, 2000 12:21 PM
To: svg-developers@egroups.com
Subject: Re: [svg-developers] Re: stretched outline


There has been an email thread which I haven't had time to respond to until
now about maintaining constant stroke width when enclosed by a non-uniform
transformation. For example:

<svg>
<g transform="scale(2 1)">
     <circle cx="30" cy="30" r="20" style="fill:none; stroke:black;
stroke-width:3"/>
</g>
</svg>

People have observed that the stroke is non-uniform in the above case with
the Adobe viewer. That is correct behavior. When Chris responded a long
time ago on this subject, he responded incorrectly. Chris and I exchanged
email on this at the time. I thought a correction was posted, but maybe it
wasn't.

Think of things as follows. The rendering of any given object (for example,
the circle above) is performed as if the object had no knowledge about any
enclosing transformations into its own local coordinate system, which looks
to the object as if it were a Cartesian coordinate system with "square"
units. (That is, one unit in X looks to be the same size as one unit in Y.)
Thus, in the local coordinate system, the circle looks circular, and the
strokes is the same width throughout.

However, because there is a non-uniform scale transformation around the
circle, the circle and its stroke get stretched. Thus, the circle turns
into an ellipse, and the stroke of the circle also gets stretched similarly
and appears with non-uniform thickness.

Conceptually, stroke is really just a shorthand for another fill. A stroke
is done by converting the outline of the stroke into a new graphic object
and then filling that outline just as if it were a graphic object. Thus,
transformations apply to strokes just as they apply to graphics.

In the above example, to stretch the circle into an ellipse but have a
constant stroke width on that ellipse, you have to change the coordinates
of the circle/ellipse instead of enclosing the object with a
transformation. For example:

     <ellipse cx="60" cy="30" rx="40" ry="20" style="fill:none;
stroke:black; stroke-width:3"/>

There has also been discussion about CSS units perhaps "helping'". They
don't. CSS units have no effect on this issue. The rule in the SVG spec has
always been that CSS units get converted into equivalent user units using
some magic formulas, and then all rendering is done as if the equivalent
user units had been specified.

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated


At 07:22 AM 11/7/00 +0000, goessner@... wrote:
>wade,
>.. i remember .. i also considered something wrong with adobe
>viewer's result. maybe someone of adobes developers crew can comment
>this ..
>
>s.goessner
>
>--- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...> wrote:
> > hmmmm, maybe I am seeing an issue with the Adobe viewer then.  I
>tried all
> > three examples from that post and all three gave the same result.  A
> > rectangle with 1px left & right but approx 10px top and bottom.
> >
> > Wade Harrell * Wade.Harrell@i...
> > Sr Content Engineer * Iguana Studios Inc
> > vox:212.209.1380 * fax:212.243.6506
> > 16 W 19th * 10th Floor
> > New York, NY 10011 - 4205
> > http://www.iguanastudios.com
> > Latitude: 40.739145  (40° 44' 20" N)
> > Longitude: -73.992089  (73° 59' 31" W)
> >
> > -----Original Message-----
> > From: goessner@m... [mailto:goessner@m...]
> > Sent: Monday, November 06, 2000 4:34 PM
> > To: svg-developers@egroups.com
> > Subject: [svg-developers] Re: stretched outline
> >
> >
> > some time ago i asked a similar question .. resolved by chris ..
> >
> > http://www.egroups.com/message/svg-developers/329
> >
> > hope that helps ..
> >
> > s.goessner
> >
> > --- In svg-developers@egroups.com, "Harrell, Wade" <wade@i...>
>wrote:
> > > This is a good question.  In a few experiments I have been doing
> > with the
> > > file you linked I have been unable to apply a stroke to a scaled
> > object
> > > without that stroke being scaled as well.  This poses a problem
>for
> > > instances where increasing the stroke-width on scale is
>undesirable.
> > >
> > > Does anyone else on the list have any insight into a solution for
> > locking
> > > the stroke-width regardless of the scale?
> > >
> > > Wade Harrell * Wade.Harrell@i...
> > > Sr Content Engineer * Iguana Studios Inc
> > > vox:212.209.1380 * fax:212.243.6506
> > > 16 W 19th * 10th Floor
> > > New York, NY 10011 - 4205
> > > http://www.iguanastudios.com
> > > Latitude: 40.739145  (40° 44' 20" N)
> > > Longitude: -73.992089  (73° 59' 31" W)
> > >
> > > -----Original Message-----
> > > From: Steve White [mailto:steve@V...]
> > > Sent: Monday, November 06, 2000 12:21 PM
> > > To: svg-developers@egroups.com
> > > Subject: [svg-developers] stretched outline
> > >
> > >
> > > I notice that when you transform (stretch) an element, it
>stretches
> > the
> > > outline. ex: http://www.virtualmechanics.com/test/stretch.svg I
> > don't
> > > suppose there is any simple way to prevent this?
> > >
> > > Yours Truly
> > >
> > > Steve White
> > > steve@V...
> > > www.VirtualMechanics.com
>
>
>

#1054 From: luke@...
Date: Tue Nov 7, 2000 8:03 pm
Subject: Re: How to access SVG thru a Java-Applet
luke@...
Send Email Send Email
 
Martin,

Here's a short example using JavaScript and the SVG embedded in an
HTML file.

<EMBED ID="SVGName" WIDTH="100%" HEIGHT="92%" NAME="SVGName"
SRC="YourFile.svg" type=image/svg-xml >

after embedding it, you need the pointer to the document object as
follows (JS from now on):

MySVG = SVGName.getSVGDocument();

Now you have dynamic access to your document through that object. So
if you have a rectangle with the ID="rect1" then you can do the
following to change its position

MySVG.getElementById("rect1").setAttribute("x", 10);

or to remove the first child node of the G element "group1":

Group = MySVG.getElementById("group1");
Save = Group.removeChild(Group.childNodes.item(0));

The removed node is stored in the Save variable (optional).

The rest from here is getting to know the DOM and all its methods and
properties to modify the SVG tree to your needs.

Let me know if this helps. I know you wanted true Java examples, but
there is a lot of them out there. Look for the SVG Toolkit at
http://www.cmis.csiro.au/svg/ which should help you.

Regards,
Luke Wrobel
GTG Technologies

--- In svg-developers@egroups.com, Martin Girschick <magir@t...>
wrote:
> Hi,
>
> I searched the documentation for it, but I couldn't find anything.
I
> want to open an svg-image with a java-applet and then add some
nodes
> to it, if someone could give me a few lines of how to do this -
would
> be great!
>
> Thanx,
>
> Martin
>
> P.S. Is there a javadoc for the SVGViewer-Classes?

#1055 From: "Harrell, Wade" <wade@...>
Date: Tue Nov 7, 2000 8:05 pm
Subject: RE: Reference Card for SVG-Syntax?
wade@...
Send Email Send Email
 
I use
http://www.adobe.com/svg/indepth/currentsupport.html
Often because it is a brief listing of what is available.  It does not
really describe each item, but that's what the spec is for.

Wade Harrell * Wade.Harrell@...
Sr Content Engineer * Iguana Studios Inc
vox:212.209.1380 * fax:212.243.6506
16 W 19th * 10th Floor
New York, NY 10011 - 4205
http://www.iguanastudios.com
Latitude: 40.739145  (40° 44' 20" N)
Longitude: -73.992089  (73° 59' 31" W)

-----Original Message-----
From: Martin Girschick [mailto:magir@...]
Sent: Tuesday, November 07, 2000 12:09 PM
To: svg-developers@egroups.com
Subject: [svg-developers] Reference Card for SVG-Syntax?


Hello again,

I'm currently writing a small html-file as a reference to the syntax
of svg. It's more a less a very short version of the specs. Perhaps
anyone else already did something like this? The specs are not very
short and I only have about 10% of it...

Regards,

Martin

#1056 From: mikeri@...
Date: Tue Nov 7, 2000 8:20 pm
Subject: Re: Problem with visibility style on a group
mikeri@...
Send Email Send Email
 
Jon:

Just tried 'display' in place of 'visibility' and it look like this
will work.  I used 'display:inline' for the elements I wanted to show.

Is this the default for 'display'?  The CSS explaination of the
values for 'display' lists this as the initial value.

I'm assuming 'display:inline' is what I want when I want to show an
element or group and 'display:none' is what I want when I want to
hide an element or group.

Thanks,
Michael Rizzo

--- In svg-developers@egroups.com, "Jon Ferraiolo" <jferraio@a...>
wrote:
> Mike,
> I just glanced through your example, so I'm not sure if this
addresses your
> question. But the 'visibility' property from CSS2 has some
unintuitive
> behavior. Sometimes it is better to use the 'display' property.
This is
> discussed in:
http://www.w3.org/TR/SVG/painting.html#VisibilityControl
>
> Jon

Messages 1027 - 1056 of 66120   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help