Search the web
Sign In
New User? Sign Up
svg-developers · SVG Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Messages 63325 - 63354 of 63354   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#63354 From: Bryan Berry <bryan@...>
Date: Wed Feb 10, 2010 5:56 am
Subject: Re: Re: How to best layout html that contains a central SVG document?
bryanbryanb
Offline Offline
Send Email Send Email
 
On Wed, Feb 10, 2010 at 9:04 AM, Francis Hemsher <fhemsher@...> wrote:

>
>
> Yeah, actually I find myself using %s mostly. The font classes, however are
> useful.
> Good luck on your project,
> Francis
>

tks dude, I may use your solution specifically for the fonts


[Non-text portions of this message have been removed]

#63353 From: Guy Morton <guy@...>
Date: Wed Feb 10, 2010 5:19 am
Subject: Re: Re: Parameterized Symbols
guy_mmmmmm
Online Now Online Now
Send Email Send Email
 
Unsubscribe then. You signed yourself up, sign yourself off. Read the links at
the bottom of each email from the list, the instructions are there, plain as
day.



On 10/02/2010, at 8:50 AM, elizabeth palmer wrote:

>
> i have no interest in your programs. please stop sending me your email
>
>
>
> To: svg-developers@yahoogroups.com
> From: kmyers1@...
> Date: Mon, 8 Feb 2010 16:10:43 -0600
> Subject: Re: [svg-developers] Re: Parameterized Symbols
>
>
>
>
>
> Hello Francis,
>
> Thanks for your suggestion, but no, I don't think that would meet my needs.
Let me attempt to explain further...
>
> I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way. This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.
>
> This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget. So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget. Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets". So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.
>
> On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files. So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.
>
> On the other hand, perhaps I am misinterpreting what you meant by "on a call
for this, clone the symbol...". Is there a way to define what you described
within the SVG itself, rather than cloning the symbol and modifying its
attributes in the creating application?
>
> Hope that clarifies things.
>
> Kevin M.
>
> ----- Original Message -----
> From: Francis Hemsher
> To: svg-developers@yahoogroups.com
> Sent: Monday, February 08, 2010 15:32
> Subject: [svg-developers] Re: Parameterized Symbols
>
> Hi Kevin,
>
> I think I would try the following:
>
> 1. create a 'base' symbol with all elements
>
> 2. on a call for this, clone the symbol, and insert the needed attribute
values on its elements. Give the symbol a new id.
>
> 3. create a use that calls the new symbol.
>
> Does that sound reasonable?
>
> Regards,
> Francis
>
> --- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
>>
>> I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly. For example, let's assume that I had a symbol
representing a pipe. In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters. The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly. I need to be able to pass additional parameters, e.g. inside diameter,
to an SVG symbol, or some more or less equivalent construct in order to handle
this situation.
>>
>> Note: Please don't ask "Why don't you just draw two separate circles?". The
real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
>>
>> Hope that makes sense. Any way to accomplish something like this?
>>
>> Thanks,
>> Kevin M.
>>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> _________________________________________________________________
> Hotmail: Free, trusted and rich email service.
> http://clk.atdmt.com/GBL/go/201469228/direct/01/
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----Yahoo! Groups Links
>
>
>

#63352 From: Mark T <paradisaeidae@...>
Date: Wed Feb 10, 2010 3:25 am
Subject: Re: How to best layout html that contains a central SVG document?
markstestacc...
Offline Offline
Send Email Send Email
 
'H'eck.
This is certainly an often-pondered set of issues!
I advocate inversion.
Start with an svg as 'top document', then use foreignObjects for the html.
Though I doubt you will find a set of cost-effective tools which will fit
your creation-flow.
I use Inkscape to get my templates, then 'manually' twitch
the foreignObjects.

How's the fresh air?

MarkT

--
(+61 4) 0679 5734
チェックアウトが、Jingle だ!
It's a Jingle Out There!

#63351 From: "Francis Hemsher" <fhemsher@...>
Date: Wed Feb 10, 2010 3:19 am
Subject: Re: How to best layout html that contains a central SVG document?
fhemsher
Offline Offline
Send Email Send Email
 
Yeah, actually I find myself using %s mostly. The font classes, however are
useful.
Good luck on your project,
Francis

--- Bryan Berry <bryan@...> wrote:
>
>> tks for the idea Francis. Doesn't this mean that each dev would have to
> maintain a list or hash of all the element styles that need to be scaled?
> Perhaps it could be done with a  map function
>  hashOfstyles.map(function(selector, property){
>              scaleStyle(selector, property, factorW);});
>
> but still sounds like a lot or work. I will try using fixed-width layout to
> accommodate a 4:3 screen ratio and %s for the values for the GameArea of my
> application. Failing that, I may try your solution.

#63350 From: Bryan Berry <bryan@...>
Date: Wed Feb 10, 2010 2:36 am
Subject: Re: Re: How to best layout html that contains a central SVG document?
bryanbryanb
Offline Offline
Send Email Send Email
 
On Tue, Feb 9, 2010 at 10:49 PM, Francis Hemsher <fhemsher@...> wrote:

>
>
> Hi Bryan,
> I use a small .js file I place in the <head> that writes the CSS
> based on screen size. It creates font size classes and a 'FactowW' which
> can be applied to various html objects. Have your developers develop at a
> specific screen width where FactorW=1, then set it at other values to
> reflect other screen widths. After html load, you would have a simple size
> handler function to apply FactorW to related html objects.
> e.g.
>
> //--The base size for the website---
> var FactorW=1
> if(screen.width<=800)
> {
> var smallFontSize="font-size:12px;"
> var mediumFontSize="font-size:15px;"
> var largeFontSize="font-size:18px;"
> FactorW=.75
> }
> if(screen.width==1024)
> {
> var smallFontSize="font-size:15px;"
> var mediumFontSize="font-size:18px;"
> var largeFontSize="font-size:20px;"
> FactorW=1
> }
> if(screen.width==1280)
> {
> var smallFontSize="font-size:17px;"
> var mediumFontSize="font-size:20;"
> var largeFontSize="font-size:24px;"
> FactorW=1.2
> }
> if(screen.width==1400)
> {
> var smallFontSize="font-size:17px;"
> var mediumFontSize="font-size:20px;"
> var largeFontSize="font-size:24px;"
> FactorW=1.4
> }
> if(screen.width>1400)
> {
> var smallFontSize="font-size:24px;"
> var mediumFontSize="font-size:28px;"
> var largeFontSize="font-size:32px;"
> FactorW=1.8
> }
> //---classes-----
> document.write("<style> .small{"+smallFontSize+"}</style>")
> document.write("<style> .medium{"+mediumFontSize+"}</style>")
> document.write("<style> .large{"+largeFontSize+"}</style>")
>
> function WRITEstyle()
> {
> document.write("<style>"+
> "body"+
> "{"+
> " "+mediumFontSize+
> "} "+
> "</style>")
> }
>
> WRITEstyle()
>
> Regards,
> Francis
>

tks for the idea Francis. Doesn't this mean that each dev would have to
maintain a list or hash of all the element styles that need to be scaled?
Perhaps it could be done with a  map function
  hashOfstyles.map(function(selector, property){
              scaleStyle(selector, property, factorW);});

but still sounds like a lot or work. I will try using fixed-width layout to
accommodate a 4:3 screen ratio and %s for the values for the GameArea of my
application. Failing that, I may try your solution.


[Non-text portions of this message have been removed]

#63349 From: "Francis Hemsher" <fhemsher@...>
Date: Wed Feb 10, 2010 1:57 am
Subject: Re: Computing the convex hull
fhemsher
Offline Offline
Send Email Send Email
 
Hi Alex,
I included the composite convex hull in my example.
It uses the Point-in-polygon: Jordan Curve Theorem.
It's not the speedy algorithm you're working on.
But, most SVG convex polygons have but a few points and should not be too much
burdend.

See example(IE/ASV) at:
http://www.mobiusportal.com/ConvexHull/convexHullIntersect.htm

Let us know when you have achieved success in your journey exceeding 0(n^2)

Regards,
Francis


--- Alex Wykel <a_wykel@...> wrote:

> My goal is to find multiple methods of doing this computation in better then
> O(n^2) time, I plan to then convert them to XAML and use them in an article I
> am working on at The Code Project on calculating the Computational Complexity
> of an Algorithm using the infinite asymptotic and heuristics.  The
> prototype works really good right now but I need examples that are a littler
> harder to measure then the simple Fibonacci Sequence I use in the Demo:

#63348 From: Alex Wykel <a_wykel@...>
Date: Tue Feb 9, 2010 10:14 pm
Subject: Re: Re: Computing the convex hull
a_wykel
Offline Offline
Send Email Send Email
 
Hi Andrew:

> I cannot say that I understand well the
method what you use.

Well I'm studying the computational complexity of joining two convex hulls,
first my algorithm find the intersections of the points that either are
coincident of the polygons or connect a line to a coincident point of the cloud
of points in the convex hulls.  These I mark as colored nodes.  I'm
creating a color graph:

http://en.wikipedia.org/wiki/Graph_coloring

In this case the graph has the following colors for points along the graph:

red:            No connection to
another point on the edge, no direct intersection found may or may not have an
intersection (un-resolved so far).
Magenta:    Coincident point connecting to a blue point has
intersection but the intersection is unknown.
Blue:          Outside point connecting to a
green point, has intersection but the intersection is unknown.

So the point of my algorithm is to get from O(n^2) time to at least polynomial
time O(n log n).

To show you an unfinished example of what the color graph looks like:

http://www.mobiusPortal.com/ConvexHull/Francis-Alex-CompositConvexHulls.svg

There are two convex hulls that overlap one Orange, one Purple:
The composite polygon (convex hull) is then calculated and drawn in Green.
The Points are also colorized as stated above.

Some numerical data is displayed for the colorized points on the right side of
the image for numerical analysis.

My goal is to find multiple methods of doing this computation in better then
O(n^2) time, I plan to then convert them to XAML and use them in an article I
am working on at The Code Project on calculating the Computational Complexity
of an Algorithm using the infinite asymptotic and heuristics.  The
prototype works really good right now but I need examples that are a littler
harder to measure then the simple Fibonacci Sequence I use in the demo:

The Demo on The Code Project:
http://www.codeproject.com/KB/recipes/BigOAnalyzer.aspx

> BTW, for what purpose you plan to use FFT? I could you recommend one nice
library.

Well, after doing the research on Geometric Algebra I learned that it is
possible to use the FFT to solve Geometric problems in O(n log n) time, so I am
doing the numerical analysis of the data to find functions I can plug into the
FFT to get the intersections and the inner points so the resulting polygon can
be calculated.



  "Make everything as simple as possible, but notsimpler."
   --  AlbertEinstein
________________________________






________________________________
From: Andrew Matseevsky <a_matseevsky@...>
To: svg-developers@yahoogroups.com
Sent: Tue, February 9, 2010 3:32:10 PM
Subject: Re: [svg-developers] Re: Computing the convex hull

>Thanks this is what I am driving at in my color graph algorithm. In the >end I
will replace Frances' intersection points with a while loop that >runs until all
line segments are excluded from the set of intersections >marked by magenta and
blue points. Then it will check the red points >which are outside convex hulls,
at the same time all lines are being >removed from the let of lines in both
convex hulls is there is a magenta >to blue line (intersection) and then iterate
over the remaining lines in >another while loop scanning for intersections with
red to red >intersections, this part can be complicated because there can be at
most >two intersections on a red to red intersection and it would have to check
>for both of them before removing the line from the list of lines to check
>until the while loop runs out of lines to look for intersections. I will >give
more thought to what you mentioned in your email. Remember I'm >attempting to do
this from a
Graph Theory
>point of view, and later will attempt to find a Fast Fourier Transform >based
on either Diagonal Matrix's or Geometric Algebra, I am inclined to >think that
when inputting the functions for the FFT it will be a >combination of both
Matrix-Determinate and Geometric Algebra where we are >looking for vectors of
x,y values to some yet to be detirmined function.

I cannot say that I understand well the method what you use. On the other hand,
for method, what I briefky described, situation when three (or more) points
belongs to the same straight line is no problem at all. When one is trying to
determine position of some point (is it to the left or to the right side of some
orientd line) this point may accidentaly belongs to this line. And what? It
means only that in such cases you need treat them as "left" (or "right", no
matter). As a result one of straight line segments, bounding your cloud of
points will be based on three (or more) points. Convex hull remains the same.
BTW, for what purpose d'you plan to use FFT? I could you nrecommend one nice
library. Look for fftw.org (or ffftw.org)



       ________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo!
Почту! http://ru.mail.yahoo.com



------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links






[Non-text portions of this message have been removed]

#63347 From: elizabeth palmer <ekpalmer@...>
Date: Tue Feb 9, 2010 9:50 pm
Subject: RE: Re: Parameterized Symbols
palmerek2002
Offline Offline
Send Email Send Email
 
i have no interest in your programs. please stop sending me your email



To: svg-developers@yahoogroups.com
From: kmyers1@...
Date: Mon, 8 Feb 2010 16:10:43 -0600
Subject: Re: [svg-developers] Re: Parameterized Symbols





Hello Francis,

Thanks for your suggestion, but no, I don't think that would meet my needs. Let
me attempt to explain further...

I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way. This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.

This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget. So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget. Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets". So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.

On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files. So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.

On the other hand, perhaps I am misinterpreting what you meant by "on a call for
this, clone the symbol...". Is there a way to define what you described within
the SVG itself, rather than cloning the symbol and modifying its attributes in
the creating application?

Hope that clarifies things.

Kevin M.

----- Original Message -----
From: Francis Hemsher
To: svg-developers@yahoogroups.com
Sent: Monday, February 08, 2010 15:32
Subject: [svg-developers] Re: Parameterized Symbols

Hi Kevin,

I think I would try the following:

1. create a 'base' symbol with all elements

2. on a call for this, clone the symbol, and insert the needed attribute values
on its elements. Give the symbol a new id.

3. create a use that calls the new symbol.

Does that sound reasonable?

Regards,
Francis

--- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
>
> I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly. For example, let's assume that I had a symbol
representing a pipe. In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters. The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly. I need to be able to pass additional parameters, e.g. inside diameter,
to an SVG symbol, or some more or less equivalent construct in order to handle
this situation.
>
> Note: Please don't ask "Why don't you just draw two separate circles?". The
real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
>
> Hope that makes sense. Any way to accomplish something like this?
>
> Thanks,
> Kevin M.
>

[Non-text portions of this message have been removed]





_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/

[Non-text portions of this message have been removed]

#63346 From: Andrew Matseevsky <a_matseevsky@...>
Date: Tue Feb 9, 2010 9:32 pm
Subject: Re: Re: Computing the convex hull
a_matseevsky
Offline Offline
Send Email Send Email
 
>Thanks this is what I am driving at in my color graph algorithm. In the >end I
will replace Frances' intersection points with a while loop that >runs until all
line segments are excluded from the set of intersections >marked by magenta and
blue points. Then it will check the red points >which are outside convex hulls,
at the same time all lines are being >removed from the let of lines in both
convex hulls is there is a magenta >to blue line (intersection) and then iterate
over the remaining lines in >another while loop scanning for intersections with
red to red >intersections, this part can be complicated because there can be at
most >two intersections on a red to red intersection and it would have to check
>for both of them before removing the line from the list of lines to check
>until the while loop runs out of lines to look for intersections. I will >give
more thought to what you mentioned in your email. Remember I'm >attempting to do
this from a
  Graph Theory
>point of view, and later will attempt to find a Fast Fourier Transform >based
on either Diagonal Matrix's or Geometric Algebra, I am inclined to >think that
when inputting the functions for the FFT it will be a >combination of both
Matrix-Determinate and Geometric Algebra where we are >looking for vectors of
x,y values to some yet to be detirmined function.

I cannot say that I understand well the method what you use. On the other hand,
for method, what I briefky described, situation when three (or more) points
belongs to the same straight line is no problem at all. When one is trying to
determine position of some point (is it to the left or to the right side of some
orientd line) this point may accidentaly belongs to this line. And what? It
means only that in such cases you need treat them as "left" (or "right", no
matter). As a result one of straight line segments, bounding your cloud of
points will be based on three (or more) points. Convex hull remains the same.
BTW, for what purpose d'you plan to use FFT? I could you nrecommend one nice
library. Look for fftw.org (or ffftw.org)



       ________________________________________________________
   Yahoo!?
   . Yahoo! ! http://ru.mail.yahoo.com

#63345 From: "Francis Hemsher" <fhemsher@...>
Date: Tue Feb 9, 2010 8:53 pm
Subject: Re: Parameterized Symbols
fhemsher
Offline Offline
Send Email Send Email
 
Hi Kevin,
As you have seen, you're ahead of the curve on the param element of the
hopefully near future.

I have created an example of an alternative method. It uses a 'base' symbol,
resident in the SVG document. It creates a use element when the server sends a
request to place a new element. The server sends only a compact data element.
That data then builds the needed symbol with the needed attributes. This is
client SVG DOM stuff, required for any type of dynamic SVG.

The example (IE/ASV) is at:
http://www.mobiusportal.com/BaseSymbol/baseSymbol.htm

Regards,
Francis

---  "Francis Hemsher" <fhemsher@...> wrote:
>
> Hi Kevin,
> I know where you're at: I tried to do the same thing many, many moons ago:)
> (I'll bet if ever found the code, it wouldn't be too much different than what
you have posted.)
> Rather than dump more confusion into the works, I'll take some time, similar
to Cameron's direction, and post a simple example.
> Tomorrow sometime,
> Francis

#63344 From: "Erik Dahlstrom" <ed@...>
Date: Tue Feb 9, 2010 7:30 pm
Subject: SVG Wow site launched
erida539
Offline Offline
Send Email Send Email
 
Hi everyone,

Vincent Hardy and I would like to announce the opening of the SVG Wow! web
site:


      http://svg-wow.org/


For a start we've released all the demos that were shown during the SVG
Wow! session at the SVG Open 2009 conference, under a CC0 license[1].

This means you are all free to build upon, modify, redistribute and do
pretty much whatever you like with these demos. We're hoping this
contribution to the SVG community will be a fruitful one, and are looking
forward to hearing what you think.

Cheers
/Erik and Vincent

[1] http://creativecommons.org/publicdomain/zero/1.0/

--
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

#63343 From: Alex Wykel <a_wykel@...>
Date: Tue Feb 9, 2010 6:33 pm
Subject: Re: strange Offset of radial Gradient in Webkit
a_wykel
Offline Offline
Send Email Send Email
 
Yeah I noticed that the fecomposite filters on the SVG wc3 site does not work
either:

http://www.w3.org/TR/SVG11/filters.html#feComposite

If you click on the SVG link you will notice that for the opacity 1.0 in filter
does not work, actually none of the composite filters work, at least in FireFox
they don't.



  "Make everything as simple as possible, but notsimpler."
   --  AlbertEinstein
________________________________






________________________________
From: pawelfritsch <pawelf@...>
To: svg-developers@yahoogroups.com
Sent: Tue, February 9, 2010 12:20:08 PM
Subject: [svg-developers] strange Offset of radial Gradient in Webkit


I dislike webkit because they don't understand any <filter>.
This eyample of an cateye: http://www.pixelfan s.de/test/ svg/cateye. svg
looks fine in fox and opera but not in webkit.

Nevertheless the idea of the svg should shown in webkit, too.
While checking the svg with chrome, iron and konqueror I noticed there is
unfortunatly a (unexpected) offset of one radial gradient.

Have you any idea why?







[Non-text portions of this message have been removed]

#63342 From: "pawelfritsch" <pawelf@...>
Date: Tue Feb 9, 2010 6:20 pm
Subject: strange Offset of radial Gradient in Webkit
pawelfritsch
Offline Offline
Send Email Send Email
 
I dislike webkit because they don't understand any <filter>.
This eyample of an cateye: http://www.pixelfans.de/test/svg/cateye.svg
looks fine in fox and opera but not in webkit.

Nevertheless the idea of the svg should shown in webkit, too.
While checking the svg with chrome, iron and konqueror I noticed there is
unfortunatly a (unexpected) offset of one radial gradient.

Have you any idea why?

#63341 From: "Francis Hemsher" <fhemsher@...>
Date: Tue Feb 9, 2010 5:04 pm
Subject: Re: How to best layout html that contains a central SVG document?
fhemsher
Offline Offline
Send Email Send Email
 
Hi Bryan,
I use a small .js file I place in the <head> that writes the CSS
based on screen size. It creates font size classes and a 'FactowW' which can be
applied to various html objects. Have your developers develop at a specific
screen width where FactorW=1, then set it at other values to reflect other
screen widths. After html load, you would have a simple size handler function to
apply FactorW to related html objects.
e.g.

//--The base size for the website---
var FactorW=1
  if(screen.width<=800)
  {
	  var smallFontSize="font-size:12px;"
	  var mediumFontSize="font-size:15px;"
	  var largeFontSize="font-size:18px;"
  	  FactorW=.75
}
  if(screen.width==1024)
  {
	  var smallFontSize="font-size:15px;"
	  var mediumFontSize="font-size:18px;"
	  var largeFontSize="font-size:20px;"
  	  FactorW=1
}
  if(screen.width==1280)
  {
	  var smallFontSize="font-size:17px;"
	  var mediumFontSize="font-size:20;"
	  var largeFontSize="font-size:24px;"
  	  FactorW=1.2
}
  if(screen.width==1400)
  {
	 var smallFontSize="font-size:17px;"
	 var mediumFontSize="font-size:20px;"
	 var largeFontSize="font-size:24px;"
 	  FactorW=1.4
  }
  if(screen.width>1400)
  {
	 var smallFontSize="font-size:24px;"
	 var mediumFontSize="font-size:28px;"
	 var largeFontSize="font-size:32px;"
 	  FactorW=1.8
  }
  //---classes-----
document.write("<style> .small{"+smallFontSize+"}</style>")
document.write("<style> .medium{"+mediumFontSize+"}</style>")
document.write("<style> .large{"+largeFontSize+"}</style>")

function WRITEstyle()
{
document.write("<style>"+
"body"+
"{"+
" "+mediumFontSize+
"} "+
"</style>")
}

WRITEstyle()

Regards,
Francis

--- Bryan Berry wrote:
>
> I work on open-source educational software using html5 and SVG. I am
> currently trying to figure out how to best layout my main lesson template so
> that it accommodates different screen resolutions and also keeps layout
> simple for those using my template
>
> you can check out my current template here:
> http://karma.sugarlabs.org/examples/English_Animal_Identification
>
> It is a pretty simple html structure, a header on top, game area in the
> middle, and footer on the bottom that contains game control buttons.  The
> game area may contain a flash swf (unfortunately), <canvas>, a large <svg>,
> or html containing svg and/or <canvas> elements
>
> To make things more complicated my main target platform is the OLPC XO-1
> laptop, which around 4,000 schoolchildren  here in Nepal. The machine has an
> atypical screen resolution of 1200 x 900
>
> Kids w/in Nepal and outside Nepal also access these lessons online. I want
> the lessons to display reasonably well across different screen resolutions.
> However, I do not want my lesson developers to have to test their lessons
> across many different screen resolutions.
>
> I would like to use a fluid css layout but it seems to me that this would
> force a lot of complexity on my developers. Also the footer always needs to
> be visible as the game control buttons are there.
>
> My current idea is to default to 1200 x900 for the layout but use % values
> w/in the game area. I plan to use javascript to detect if the viewport size
> is not 1200 x900 and then set the size of the <body> to 1024 x 768.
>
> Does anyone have a better idea how to accomplish this? I would very much
> appreciate your comments. I would think this would be a common problem for
> rich Internet applications that prominently use <svg>
>

#63340 From: "th_w@..." <th_w@...>
Date: Tue Feb 9, 2010 10:01 am
Subject: Re: Parameterized Symbols
th_w@ymail.com
Offline Offline
Send Email Send Email
 
Would XSLT stylesheets be an option, either as a separate transformation step or
in the viewer (web browser)?  You could generate something like


<?xml version="1.0" standalone="no"?>
<?xml-stylesheet href="myStylesheet.xsl" type="text/xsl" ?>
<myGeneratedXML>
   <rectSymbol x="25" y="10" SquareSize="2"/>
   <rectSymbol x="45" y="10" SquareSize="4"/>
   <rectSymbol x="65" y="10" SquareSize="6"/>
   <rectSymbol x="85" y="10" SquareSize="8"/>
</myGeneratedXML>


and use something like this as a XSLT stylesheet (named myStylesheet.xsl)


<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns="http://www.w3.org/2000/svg">
   <xsl:template match="/myGeneratedXML">
     <svg>
       <xsl:for-each select="rectSymbol">
         <g transform="translate({@x},{@y})">
           <rect x="1" y="1" width="{@SquareSize}" height="{@SquareSize}"/>
           <rect x="11" y="1" width="{@SquareSize}" height="{@SquareSize}"/>
           <rect x="1" y="11" width="{@SquareSize}" height="{@SquareSize}"/>
           <rect x="11" y="11" width="{@SquareSize}" height="{@SquareSize}"/>
         </g>
       </xsl:for-each>
     </svg>
   </xsl:template>
</xsl:stylesheet>


to effectively get something like this:


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
   <g transform="translate(25, 10)">
     <rect x="1" y="1" width="2" height="2"/>
     <rect x="11" y="1" width="2" height="2"/>
     <rect x="1" y="11" width="2" height="2"/>
     <rect x="11" y="11" width="2" height="2"/>
   </g>
   <g transform="translate(45, 10)">
     <rect x="1" y="1" width="4" height="4"/>
     <rect x="11" y="1" width="4" height="4"/>
     <rect x="1" y="11" width="4" height="4"/>
     <rect x="11" y="11" width="4" height="4"/>
   </g>
   <g transform="translate(65, 10)">
     <rect x="1" y="1" width="6" height="6"/>
     <rect x="11" y="1" width="6" height="6"/>
     <rect x="1" y="11" width="6" height="6"/>
     <rect x="11" y="11" width="6" height="6"/>
   </g>
   <g transform="translate(85, 10)">
     <rect x="1" y="1" width="8" height="8"/>
     <rect x="11" y="1" width="8" height="8"/>
     <rect x="1" y="11" width="8" height="8"/>
     <rect x="11" y="11" width="8" height="8"/>
   </g>
</svg>


XSLT is capable of doing some math, too.

Thomas W.


--- In svg-developers@yahoogroups.com, "Kevin Myers" <kmyers1@...> wrote:
>
> Tell you what, rather than using my "pipe" example, let's just use this
example straight from the W3C SVG docs:
>
> (My apologies in advances if Lookout Express mangles this on the way out...)
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
>   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
>      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
>   <desc>Example Use02 - 'use' on a 'symbol'</desc>
>   <defs>
>     <symbol id="MySymbol" viewBox="0 0 20 20">
>       <desc>MySymbol - four rectangles in a grid</desc>
>       <rect x="1" y="1" width="8" height="8"/>
>       <rect x="11" y="1" width="8" height="8"/>
>       <rect x="1" y="11" width="8" height="8"/>
>       <rect x="11" y="11" width="8" height="8"/>
>     </symbol>
>   </defs>
>   <rect x=".1" y=".1" width="99.8" height="29.8"
>         fill="none" stroke="blue" stroke-width=".2" />
>   <use x="45" y="10" width="10" height="10"
>        xlink:href="#MySymbol" />
> </svg>
>
> Now pretend that we wanted to to use this symbol multiple times in our
drawing, but in each differrent usage we not only want to control the p[osition
and overall size of the symbol, but also the size of the individual squares.  So
conceptually I would like to be able to write out an SVG file that contaisortns
something similar to:
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
>   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
>      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
>   <desc>Example Use02 - 'use' on a 'symbol'</desc>
>   <defs>
>     <symbol id="MySymbol" viewBox="0 0 20 20" SquareSize="8">
>       <desc>MySymbol - four rectangles in a grid</desc>
>       <rect x="1" y="1" width=SquareSize height=SquareSize/>
>       <rect x="11" y="1" width=SquareSize height=SquareSize/>
>       <rect x="1" y="11" width=SquareSize height=SquareSize/>
>       <rect x="11" y="11" width=SquareSize height=SquareSize/>
>     </symbol>
>   </defs>
>   <rect x=".1" y=".1" width="99.8" height="29.8"
>         fill="none" stroke="blue" stroke-width=".2" />
>   <use x="25" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=2/>
>   <use x="45" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=4/>
>   <use x="65" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=6/>
>   <use x="85" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=8/>
> </svg>
>
> I am not an XML guru, and have no idea whether anything vaguely similar to
that suggested above is permissible from an XML syntax standpoint, much less for
SVG.  But I hope that the intended effect is clear enough, at least for
discussion purposes.
>
> Thanks again,
> Kevin M.
>
>
>
>   ----- Original Message -----
>   From: Cameron Laird
>   To: svg-developers@yahoogroups.com
>   Sent: Monday, February 08, 2010 18:14
>   Subject: Re: [svg-developers] Re: Parameterized Symbols
>
>
>
>   On Mon, Feb 08, 2010 at 06:00:01PM -0600, Kevin Myers wrote:
>   .
>   .
>   .
>   > Yes, I could essentially write a "code generator" that could accomplish
the desired result, writing out Java, AutoLisp or whatever else, and I think
that's more or less what you are describing here. But I was sure hoping to avoid
that. It seems like SVG files themselves ought to include the necessary
functionality to handle the requirement for drawing of parameterized symbols.
>   .
>   .
>   .
>   ! Java ... well, my own thought is that there *are* simpler
>   ways. While I'm in meetings the next couple of days, I'll
>   pull together a sample of what I have in mind, perhaps by
>   this weekend, so we can better understand each other.
>
>   Kevin, please provide one little .svg of a single pipe symbol
>   as you imagine it. I'll happily incorporate that.
>
>
>
>
> [Non-text portions of this message have been removed]
>

#63339 From: Mark T <paradisaeidae@...>
Date: Tue Feb 9, 2010 8:20 am
Subject: Re: How to best layout html that contains a central SVG document?
markstestacc...
Offline Offline
Send Email Send Email
 
O, heck.
This is certainly an often-pondered set of issues!
Me, I advocate inversion.
Start with an svg as 'top document', then use foreignObjects for the html.
Though I doubt you will find a set of cost-effective tools which will fit
your creation-flow.
I use Inkscape to get my templates, then 'manually' twitch
the foreignObjects.

How's the fresh air?

MarkT

On Tue, Feb 9, 2010 at 6:43 PM, Bryan Berry <bryan@...> wrote:

>
>
> I work on open-source educational software using html5 and SVG. I am
>
--
(+61 4) 0679 5734
チェックアウトが、Jingle だ!
It's a Jingle Out There!


[Non-text portions of this message have been removed]

#63338 From: Bryan Berry <bryan@...>
Date: Tue Feb 9, 2010 7:43 am
Subject: How to best layout html that contains a central SVG document?
bryanbryanb
Offline Offline
Send Email Send Email
 
I work on open-source educational software using html5 and SVG. I am
currently trying to figure out how to best layout my main lesson template so
that it accommodates different screen resolutions and also keeps layout
simple for those using my template

you can check out my current template here:
http://karma.sugarlabs.org/examples/English_Animal_Identification

It is a pretty simple html structure, a header on top, game area in the
middle, and footer on the bottom that contains game control buttons.  The
game area may contain a flash swf (unfortunately), <canvas>, a large <svg>,
or html containing svg and/or <canvas> elements

To make things more complicated my main target platform is the OLPC XO-1
laptop, which around 4,000 schoolchildren  here in Nepal. The machine has an
atypical screen resolution of 1200 x 900

Kids w/in Nepal and outside Nepal also access these lessons online. I want
the lessons to display reasonably well across different screen resolutions.
However, I do not want my lesson developers to have to test their lessons
across many different screen resolutions.

I would like to use a fluid css layout but it seems to me that this would
force a lot of complexity on my developers. Also the footer always needs to
be visible as the game control buttons are there.

My current idea is to default to 1200 x900 for the layout but use % values
w/in the game area. I plan to use javascript to detect if the viewport size
is not 1200 x900 and then set the size of the <body> to 1024 x 768.

Does anyone have a better idea how to accomplish this? I would very much
appreciate your comments. I would think this would be a common problem for
rich Internet applications that prominently use <svg>


[Non-text portions of this message have been removed]

#63337 From: "jeff_schiller" <jeff_schiller@...>
Date: Tue Feb 9, 2010 5:58 am
Subject: Re: Parameterized Symbols
jeff_schiller
Offline Offline
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, "Kevin Myers" <kmyers1@...> wrote:
>
> Hello Jeff,
>
> Thanks very much for that info.  Surprised I didn't come across that reference
in my Google searches.  In any case, yes, it looks like that spec is designed to
handle exactly what I want to do.  Am I correct to assume that this spec hasn't
actually been approved or implemented in any svg file format viewers or
converters as of yet?

Yes, you are correct.  No user agents to my knowledge have mentioned a timeframe
when they would be experimenting with the SVG Parameters spec.

I think the WG is welcoming feedback on that specification, so feel free to let
the www-svg mailing list know if you have something.

Regards,
Jeff

#63336 From: "Kevin Myers" <kmyers1@...>
Date: Tue Feb 9, 2010 5:15 am
Subject: Re: Re: Parameterized Symbols
myersoil1
Offline Offline
Send Email Send Email
 
P.S. - Is there any provision in the SVG 2.0 parameters proposal to allow for
parameter values to be used in mathematical expressions for setting individual
attribute values?  That would be crtiical for many parameterized object
implementations, where for example the value of multiple attributes should be
based on various multiples or percentages of a single parameter value.  I didn't
see any specific provision for this, but maybe I'm missing something else that
would already provide this capability once parameters are implemented.

Kevin M.


   ----- Original Message -----
   From: Kevin Myers
   To: svg-developers@yahoogroups.com
   Sent: Monday, February 08, 2010 22:48
   Subject: Re: [svg-developers] Re: Parameterized Symbols


   Hello Jeff,

   Thanks very much for that info.  Surprised I didn't come across that reference
in my Google searches.  In any case, yes, it looks like that spec is designed to
handle exactly what I want to do.  Am I correct to assume that this spec hasn't
actually been approved or implemented in any svg file format viewers or
converters as of yet?  Unfortunately, in my usage situation I don't really have
an opportunity to make use of something like param.js to temporarily shim in the
parameter values, so if the parameter syntax isn't directly supported yet by
most mainstream applications that make use of SVG files, then it won't really do
me too much good at the present time.  :-(

   Never the less, it is good to know that this issue is at least receiving
consideration.

   Thanks again,
   Kevin M.


     ----- Original Message -----
     From: jeff_schiller
     To: svg-developers@yahoogroups.com
     Sent: Monday, February 08, 2010 21:09
     Subject: [svg-developers] Re: Parameterized Symbols



     Hi Kevin,

     You might want to check out Doug Schepers "SVG Parameters" spec, in draft
state. He even has a script that shims in parameters:

     http://www.w3.org/TR/SVGParamPrimer/

     Look at params.js

     Disclaimer: I haven't used his script yet.

     Regards,
     Jeff

     --- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
     >
     > I would like to create some "symbol" definitions using SVG, where the
symbol requires more information than simple position, scaling, and
transformation in order to be drawn correctly. For example, let's assume that I
had a symbol representing a pipe. In order to be drawn correctly, this symbol
needs to know BOTH its inside and outside diameters. The outside diameter can be
effectively handled by simply scaling the symbol, but that won't size the inside
diameter properly. I need to be able to pass additional parameters, e.g. inside
diameter, to an SVG symbol, or some more or less equivalent construct in order
to handle this situation.
     >
     > Note: Please don't ask "Why don't you just draw two separate circles?".
The real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
     >
     > Hope that makes sense. Any way to accomplish something like this?
     >
     > Thanks,
     > Kevin M.
     >





[Non-text portions of this message have been removed]

#63335 From: "Kevin Myers" <kmyers1@...>
Date: Tue Feb 9, 2010 4:48 am
Subject: Re: Re: Parameterized Symbols
myersoil1
Offline Offline
Send Email Send Email
 
Hello Jeff,

Thanks very much for that info.  Surprised I didn't come across that reference
in my Google searches.  In any case, yes, it looks like that spec is designed to
handle exactly what I want to do.  Am I correct to assume that this spec hasn't
actually been approved or implemented in any svg file format viewers or
converters as of yet?  Unfortunately, in my usage situation I don't really have
an opportunity to make use of something like param.js to temporarily shim in the
parameter values, so if the parameter syntax isn't directly supported yet by
most mainstream applications that make use of SVG files, then it won't really do
me too much good at the present time.  :-(

Never the less, it is good to know that this issue is at least receiving
consideration.

Thanks again,
Kevin M.


   ----- Original Message -----
   From: jeff_schiller
   To: svg-developers@yahoogroups.com
   Sent: Monday, February 08, 2010 21:09
   Subject: [svg-developers] Re: Parameterized Symbols



   Hi Kevin,

   You might want to check out Doug Schepers "SVG Parameters" spec, in draft
state. He even has a script that shims in parameters:

   http://www.w3.org/TR/SVGParamPrimer/

   Look at params.js

   Disclaimer: I haven't used his script yet.

   Regards,
   Jeff

   --- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
   >
   > I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly. For example, let's assume that I had a symbol
representing a pipe. In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters. The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly. I need to be able to pass additional parameters, e.g. inside diameter,
to an SVG symbol, or some more or less equivalent construct in order to handle
this situation.
   >
   > Note: Please don't ask "Why don't you just draw two separate circles?". The
real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
   >
   > Hope that makes sense. Any way to accomplish something like this?
   >
   > Thanks,
   > Kevin M.
   >





[Non-text portions of this message have been removed]

#63334 From: "jeff_schiller" <jeff_schiller@...>
Date: Tue Feb 9, 2010 3:09 am
Subject: Re: Parameterized Symbols
jeff_schiller
Offline Offline
Send Email Send Email
 
Hi Kevin,

You might want to check out Doug Schepers "SVG Parameters" spec, in draft state.
He even has a script that shims in parameters:

http://www.w3.org/TR/SVGParamPrimer/

Look at params.js

Disclaimer:  I haven't used his script yet.

Regards,
Jeff

--- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
>
> I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly.  For example, let's assume that I had a symbol
representing a pipe.  In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters.  The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly.  I need to be able to pass additional parameters, e.g. inside
diameter, to an SVG symbol, or some more or less equivalent construct in order
to handle this situation.
>
> Note: Please don't ask "Why don't you just draw two separate circles?".  The
real symbols that I am working with are more complex than this simplistic
example.  I need the ability to draw these more complex symbols potentially
based on multiple such additional parameters, and use something similar to
symbols via the USE construct so that the symbol definition doesn't need to be
repeated as would have to be done using Groups.
>
> Hope that makes sense.  Any way to accomplish something like this?
>
> Thanks,
> Kevin M.
>

#63333 From: "Francis Hemsher" <fhemsher@...>
Date: Tue Feb 9, 2010 1:37 am
Subject: Re: Parameterized Symbols
fhemsher
Offline Offline
Send Email Send Email
 
Hi Kevin,
I know where you're at: I tried to do the same thing many, many moons ago:)
(I'll bet if ever found the code, it wouldn't be too much different than what
you have posted.)
Rather than dump more confusion into the works, I'll take some time, similar to
Cameron's direction, and post a simple example.
Tomorrow sometime,
Francis

--- "Kevin Myers" <kmyers1@...> wrote:
>
> Tell you what, rather than using my "pipe" example, let's just use this
example straight from the W3C SVG docs:
>
> (My apologies in advances if Lookout Express mangles this on the way out...)
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
>   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
>      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
>   <desc>Example Use02 - 'use' on a 'symbol'</desc>
>   <defs>
>     <symbol id="MySymbol" viewBox="0 0 20 20">
>       <desc>MySymbol - four rectangles in a grid</desc>
>       <rect x="1" y="1" width="8" height="8"/>
>       <rect x="11" y="1" width="8" height="8"/>
>       <rect x="1" y="11" width="8" height="8"/>
>       <rect x="11" y="11" width="8" height="8"/>
>     </symbol>
>   </defs>
>   <rect x=".1" y=".1" width="99.8" height="29.8"
>         fill="none" stroke="blue" stroke-width=".2" />
>   <use x="45" y="10" width="10" height="10"
>        xlink:href="#MySymbol" />
> </svg>
>
> Now pretend that we wanted to to use this symbol multiple times in our
drawing, but in each differrent usage we not only want to control the p[osition
and overall size of the symbol, but also the size of the individual squares.  So
conceptually I would like to be able to write out an SVG file that contains
something similar to:
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
>   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
>      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
>   <desc>Example Use02 - 'use' on a 'symbol'</desc>
>   <defs>
>     <symbol id="MySymbol" viewBox="0 0 20 20" SquareSize="8">
>       <desc>MySymbol - four rectangles in a grid</desc>
>       <rect x="1" y="1" width=SquareSize height=SquareSize/>
>       <rect x="11" y="1" width=SquareSize height=SquareSize/>
>       <rect x="1" y="11" width=SquareSize height=SquareSize/>
>       <rect x="11" y="11" width=SquareSize height=SquareSize/>
>     </symbol>
>   </defs>
>   <rect x=".1" y=".1" width="99.8" height="29.8"
>         fill="none" stroke="blue" stroke-width=".2" />
>   <use x="25" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=2/>
>   <use x="45" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=4/>
>   <use x="65" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=6/>
>   <use x="85" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=8/>
> </svg>
>
> I am not an XML guru, and have no idea whether anything vaguely similar to
that suggested above is permissible from an XML syntax standpoint, much less for
SVG.  But I hope that the intended effect is clear enough, at least for
discussion purposes.
>
> Thanks again,
> Kevin M.
>

#63332 From: "Kevin Myers" <kmyers1@...>
Date: Tue Feb 9, 2010 12:55 am
Subject: Re: Re: Parameterized Symbols
myersoil1
Offline Offline
Send Email Send Email
 
Tell you what, rather than using my "pipe" example, let's just use this example
straight from the W3C SVG docs:

(My apologies in advances if Lookout Express mangles this on the way out...)

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
   <desc>Example Use02 - 'use' on a 'symbol'</desc>
   <defs>
     <symbol id="MySymbol" viewBox="0 0 20 20">
       <desc>MySymbol - four rectangles in a grid</desc>
       <rect x="1" y="1" width="8" height="8"/>
       <rect x="11" y="1" width="8" height="8"/>
       <rect x="1" y="11" width="8" height="8"/>
       <rect x="11" y="11" width="8" height="8"/>
     </symbol>
   </defs>
   <rect x=".1" y=".1" width="99.8" height="29.8"
         fill="none" stroke="blue" stroke-width=".2" />
   <use x="45" y="10" width="10" height="10"
        xlink:href="#MySymbol" />
</svg>

Now pretend that we wanted to to use this symbol multiple times in our drawing,
but in each differrent usage we not only want to control the p[osition and
overall size of the symbol, but also the size of the individual squares.  So
conceptually I would like to be able to write out an SVG file that contains
something similar to:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
   "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
      xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
   <desc>Example Use02 - 'use' on a 'symbol'</desc>
   <defs>
     <symbol id="MySymbol" viewBox="0 0 20 20" SquareSize="8">
       <desc>MySymbol - four rectangles in a grid</desc>
       <rect x="1" y="1" width=SquareSize height=SquareSize/>
       <rect x="11" y="1" width=SquareSize height=SquareSize/>
       <rect x="1" y="11" width=SquareSize height=SquareSize/>
       <rect x="11" y="11" width=SquareSize height=SquareSize/>
     </symbol>
   </defs>
   <rect x=".1" y=".1" width="99.8" height="29.8"
         fill="none" stroke="blue" stroke-width=".2" />
   <use x="25" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=2/>
   <use x="45" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=4/>
   <use x="65" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=6/>
   <use x="85" y="10" width="10" height="10" xlink:href="#MySymbol"
MySymbol.SquareSize=8/>
</svg>

I am not an XML guru, and have no idea whether anything vaguely similar to that
suggested above is permissible from an XML syntax standpoint, much less for SVG.
But I hope that the intended effect is clear enough, at least for discussion
purposes.

Thanks again,
Kevin M.



   ----- Original Message -----
   From: Cameron Laird
   To: svg-developers@yahoogroups.com
   Sent: Monday, February 08, 2010 18:14
   Subject: Re: [svg-developers] Re: Parameterized Symbols



   On Mon, Feb 08, 2010 at 06:00:01PM -0600, Kevin Myers wrote:
   .
   .
   .
   > Yes, I could essentially write a "code generator" that could accomplish the
desired result, writing out Java, AutoLisp or whatever else, and I think that's
more or less what you are describing here. But I was sure hoping to avoid that.
It seems like SVG files themselves ought to include the necessary functionality
to handle the requirement for drawing of parameterized symbols.
   .
   .
   .
   ! Java ... well, my own thought is that there *are* simpler
   ways. While I'm in meetings the next couple of days, I'll
   pull together a sample of what I have in mind, perhaps by
   this weekend, so we can better understand each other.

   Kevin, please provide one little .svg of a single pipe symbol
   as you imagine it. I'll happily incorporate that.




[Non-text portions of this message have been removed]

#63331 From: Cameron Laird <claird@...>
Date: Tue Feb 9, 2010 12:14 am
Subject: Re: Re: Parameterized Symbols
Cameron_Laird
Offline Offline
Send Email Send Email
 
On Mon, Feb 08, 2010 at 06:00:01PM -0600, Kevin Myers wrote:
			 .
			 .
			 .
> Yes, I could essentially write a "code generator" that could accomplish the
desired result, writing out Java, AutoLisp or whatever else, and I think that's
more or less what you are describing here.  But I was sure hoping to avoid that.
It seems like SVG files themselves ought to include the necessary functionality
to handle the requirement for drawing of parameterized symbols.
			 .
			 .
			 .
!  Java ... well, my own thought is that there *are* simpler
ways.  While I'm in meetings the next couple of days, I'll
pull together a sample of what I have in mind, perhaps by
this weekend, so we can better understand each other.

Kevin, please provide one little .svg of a single pipe symbol
as you imagine it.  I'll happily incorporate that.

#63330 From: "Kevin Myers" <kmyers1@...>
Date: Tue Feb 9, 2010 12:00 am
Subject: Re: Re: Parameterized Symbols
myersoil1
Offline Offline
Send Email Send Email
 
Yes, I could essentially write a "code generator" that could accomplish the
desired result, writing out Java, AutoLisp or whatever else, and I think that's
more or less what you are describing here.  But I was sure hoping to avoid that.
It seems like SVG files themselves ought to include the necessary functionality
to handle the requirement for drawing of parameterized symbols.


   ----- Original Message -----
   From: Alex Wykel
   To: svg-developers@yahoogroups.com
   Sent: Monday, February 08, 2010 17:39
   Subject: Re: [svg-developers] Re: Parameterized Symbols



   I worked on a system at Intergraph that did just what you want to do. It was
really messy to work on, basically their GIS software has the ability to create
an SVG image from GIS data, how it did this I have no idea, I assume it was a
massive C++ application that turned the GIS data into SVG via spherical
geometry, that is not what is important. What is important is when they needed
to create a map and then add elements to the map. They did this using JavaScript
injection via Ajax calls from ASP.NET. I remember that it required that the
schema for SVG, HTML, and their SVG widgets to be defined, they used a custom
Ajax script to do the injection of the SVG widgets.

   Here is a really simple example of Ajax SVG Injection:
   http://softwareas.com/inline-svg

   The code on the ASP.NET side got really ugly really fast, the hardest part is
that you have to find the SVG elementID in the DOM where you want to place the
new widget, this was done using custom JavaScript in the Ajax client side code
to compute the x,y corridinates of the element where you wanted to place the new
widget (a stick pin for example to mark a spot on the map, or a pop-up event
enabled section of the map). It was a really short contract so I don't have all
the details I don't have the code, even if I did it would be a breach of
contract to share it with you. But this is the general concept they used. The
SVG Widget schema was probibaly the most important part because it allows you to
locate the position. For thier maps all maps were SVG drawings composed of many
custom SVG widgets, so all they had to do was get the element by name which had
it's x,y data and more and then insert or overlay the new SVG into the DOM.

   "Make everything as simple as possible, but notsimpler."
   -- AlbertEinstein
   ________________________________



   ________________________________
   From: Kevin Myers <kmyers1@...>
   To: svg-developers@yahoogroups.com
   Sent: Mon, February 8, 2010 4:28:45 PM
   Subject: Re: [svg-developers] Re: Parameterized Symbols

   Perhaps I should clarify a bit further on one point: The widgets that I want
to define represent objects on maps and other complex technical drawings. They
aren't the simple widgets typical of user interface definitions.

   ----- Original Message -----
   From: Kevin Myers
   To: svg-developers@ yahoogroups. com
   Sent: Monday, February 08, 2010 16:10
   Subject: Re: [svg-developers] Re: Parameterized Symbols

   Hello Francis,

   Thanks for your suggestion, but no, I don't think that would meet my needs.
Let me attempt to explain further...

   I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way. This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.

   This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget. So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget. Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets". So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.

   On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files. So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.

   On the other hand, perhaps I am misinterpreting what you meant by "on a call
for this, clone the symbol...". Is there a way to define what you described
within the SVG itself, rather than cloning the symbol and modifying its
attributes in the creating application?

   Hope that clarifies things.

   Kevin M.

   ----- Original Message -----
   From: Francis Hemsher
   To: svg-developers@ yahoogroups. com
   Sent: Monday, February 08, 2010 15:32
   Subject: [svg-developers] Re: Parameterized Symbols

   Hi Kevin,

   I think I would try the following:

   1. create a 'base' symbol with all elements

   2. on a call for this, clone the symbol, and insert the needed attribute
values on its elements. Give the symbol a new id.

   3. create a use that calls the new symbol.

   Does that sound reasonable?

   Regards,
   Francis

   --- In svg-developers@ yahoogroups. com, "Kevin M" <kmyers1@... > wrote:
   >
   > I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly. For example, let's assume that I had a symbol
representing a pipe. In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters. The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly. I need to be able to pass additional parameters, e.g. inside diameter,
to an SVG symbol, or some more or less equivalent construct in order to handle
this situation.
   >
   > Note: Please don't ask "Why don't you just draw two separate circles?". The
real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
   >
   > Hope that makes sense. Any way to accomplish something like this?
   >
   > Thanks,
   > Kevin M.
   >

   [Non-text portions of this message have been removed]

   [Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]

#63329 From: Alex Wykel <a_wykel@...>
Date: Mon Feb 8, 2010 11:39 pm
Subject: Re: Re: Parameterized Symbols
a_wykel
Offline Offline
Send Email Send Email
 
I worked on a system at Intergraph that did just what you want to do.  It was
really messy to work on, basically their GIS software has the ability to create
an SVG image from GIS data, how it did this I have no idea, I assume it was a
massive C++ application that turned the GIS data into SVG via spherical
geometry, that is not what is important.  What is important is when they needed
to create a map and then add elements to the map.  They did this using
JavaScript injection via Ajax calls from ASP.NET.  I remember that it required
that the schema for SVG, HTML, and their SVG widgets to be defined, they used a
custom Ajax script to do the injection of the SVG widgets.

Here is a really simple example of Ajax SVG Injection:
http://softwareas.com/inline-svg

The code on the ASP.NET side got really ugly really fast, the hardest part is
that you have to find the SVG elementID in the DOM where you want to place the
new widget, this was done using custom JavaScript in the Ajax client side code
to compute the x,y corridinates of the element where you wanted to place the new
widget (a stick pin for example to mark a spot on the map, or a pop-up event
enabled section of the map).  It was a really short contract so I don't have all
the details I don't have the code, even if I did it would be a breach of
contract to share it with you.  But this is the general concept they used.  The
SVG Widget schema was probibaly the most important part because it allows you to
locate the position.  For thier maps all maps were SVG drawings composed of many
custom SVG widgets, so all they had to do was get the element by name which had
it's x,y data and more and then insert or overlay the new SVG into the DOM.



  "Make everything as simple as possible, but notsimpler."
   --  AlbertEinstein
________________________________






________________________________
From: Kevin Myers <kmyers1@...>
To: svg-developers@yahoogroups.com
Sent: Mon, February 8, 2010 4:28:45 PM
Subject: Re: [svg-developers] Re: Parameterized Symbols


Perhaps I should clarify a bit further on one point:  The widgets that I want to
define represent objects on maps and other complex technical drawings.  They
aren't the simple widgets typical of user interface definitions.

----- Original Message -----
From: Kevin Myers
To: svg-developers@ yahoogroups. com
Sent: Monday, February 08, 2010 16:10
Subject: Re: [svg-developers] Re: Parameterized Symbols

Hello Francis,

Thanks for your suggestion, but no, I don't think that would meet my needs.  Let
me attempt to explain further...

I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way.  This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.

This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget.  So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget.  Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets".  So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.

On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files.  So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.

On the other hand, perhaps I am misinterpreting what you meant by "on a call for
this, clone the symbol...".  Is there a way to define what you described within
the SVG itself, rather than cloning the symbol and modifying its attributes in
the creating application?

Hope that clarifies things.

Kevin M.

----- Original Message -----
From: Francis Hemsher
To: svg-developers@ yahoogroups. com
Sent: Monday, February 08, 2010 15:32
Subject: [svg-developers] Re: Parameterized Symbols

Hi Kevin,

I think I would try the following:

1. create a 'base' symbol with all elements

2. on a call for this, clone the symbol, and insert the needed attribute values
on its elements. Give the symbol a new id.

3. create a use that calls the new symbol.

Does that sound reasonable?

Regards,
Francis

--- In svg-developers@ yahoogroups. com, "Kevin M" <kmyers1@... > wrote:
>
> I would like to create some "symbol" definitions using SVG, where the symbol
requires more information than simple position, scaling, and transformation in
order to be drawn correctly. For example, let's assume that I had a symbol
representing a pipe. In order to be drawn correctly, this symbol needs to know
BOTH its inside and outside diameters. The outside diameter can be effectively
handled by simply scaling the symbol, but that won't size the inside diameter
properly. I need to be able to pass additional parameters, e.g. inside diameter,
to an SVG symbol, or some more or less equivalent construct in order to handle
this situation.
>
> Note: Please don't ask "Why don't you just draw two separate circles?". The
real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
>
> Hope that makes sense. Any way to accomplish something like this?
>
> Thanks,
> Kevin M.
>

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]

#63328 From: Alex Wykel <a_wykel@...>
Date: Mon Feb 8, 2010 11:24 pm
Subject: Re: Re: Computing the convex hull
a_wykel
Offline Offline
Send Email Send Email
 
Thanks this is what I am driving at in my color graph algorithm.  In the end I
will replace Frances' intersection points with a while loop that runs until all
line segments are excluded from the set of intersections marked by magenta and
blue points.  Then it will check the red points which are outside convex hulls,
at the same time all lines are being removed from the let of lines in both
convex hulls is there is a magenta to blue line (intersection) and then iterate
over the remaining lines in another while loop scanning for intersections with
red to red intersections, this part can be complicated because there can be at
most two intersections on a red to red intersection and it would have to check
for both of them before removing the line from the list of lines to check until
the while loop runs out of lines to look for intersections.  I will give more
thought to what you mentioned in your email.  Remember I'm attempting to do this
from a Graph Theory
  point of view, and later will attempt to find a Fast Fourier Transform based on
either Diagonal Matrix's or Geometric Algebra, I am inclined to think that when
inputting the functions for the FFT it will be a combination of both
Matrix-Determinate and Geometric Algebra where we are looking for vectors of x,y
values to some yet to be detirmined function.

On a diffrent note:
Any one know where to write a theoretical essay about a quantum computer chip,
last night I discovered how to create a quantum computer using white light
micro-lasers, a thin concave optic, an array of pezio-electric prisms mounted on
an x,y oscillator plane on the prism configuration, with incident quantum field
effect represented by interference of the dispersion and refraction of the light
from the micro lasers, this is then input to a highly sensitive CCD which is
built in three dimensions like a city of pymirids, each level capable of 
converting the image signal into a binary format in the range of the visable
spectrum.  I onle wrote an article about an theoritical optical transistor in
2001 and in 2007 some physists created it exactly the same way, only changing
one minor part.  My way would still be the optimal in regards to computational
speed of the device, and since thiers used thermal coefficents a practical
device would breakdown when used
  in a chip due to heat expansion of electrons traveling through a semiconductor.
But I want to write about it and I don't know of any research groups or fourms
for it.



  "Make everything as simple as possible, but notsimpler."
   --  AlbertEinstein
________________________________






________________________________
From: Andrew Matseevsky <a_matseevsky@...>
To: svg-developers@yahoogroups.com
Sent: Mon, February 8, 2010 4:57:25 PM
Subject: [svg-developers] Re: Computing the convex hull

     Well, may be this info will be useful for you. A method, what scans the list
of input points only once. At the first stage you need create an initial convex
hull, based on the first 3 points (there is the only restriction- these points
must not belong to the same straight line). There will be three straight line
segments- first from point 1 to point 2, second from 2 to 3 and third from 3 to
1. Assume, that if one goes along these segments, the initial convex hull is
situated to the left side. Then you take the fourth point and check, if this
point is outside the initial convex hull or not. If it is inside, go to the
fifth point. Otherwise the initial convex hull is to be rebuild. Assume, that
the only segment number two (from point 2 to 3) is visible from point number 4.
In this case, segment 2 needs to be excluded from the convex hull and replaced
by two segments: from point 2 to 4 and from 4 to 3. In that case you will have
four segments. If two
segments are visible from point number 4 (for example, segments 2 and 3) the
point number 3 is to be excluded from convex hull and replaced by point number
4. To check if some point is inside or outside an initial convex hull is rather
simple procedure. Each segment has its own direction (one may say, that it is a
vector). So each segment belongs to infinite straight oriented line. One needs
to check point 4 for each line- where this point is placed- to the left side of
a line or to the right. One needs to create a list for point 4 with its
orientations. If this list is (left, left, left) it means that point 4 is inside
the initial convex hull. If the list is the next (left, right, left) it means
that point 4 is outside, segment 2 is visible from point 4 and is to be
replaced. (left, right, right) means that point 4 is outside, two segments are
visible and are to be replaced. Of course, (right, right, right) is impossible.
Hope, I've explained this
method enough good- English isn't my mother's tongue.




       ________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo!
Почту! http://ru.mail.yahoo.com



------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links






[Non-text portions of this message have been removed]

#63327 From: Andrew Matseevsky <a_matseevsky@...>
Date: Mon Feb 8, 2010 10:57 pm
Subject: Re: Computing the convex hull
a_matseevsky
Offline Offline
Send Email Send Email
 
Well, may be this info will be useful for you. A method, what scans the list of
input points only once. At the first stage you need create an initial convex
hull, based on the first 3 points (there is the only restriction- these points
must not belong to the same straight line). There will be three straight line
segments- first from point 1 to point 2, second from 2 to 3 and third from 3 to
1. Assume, that if one goes along these segments, the initial convex hull is
situated to the left side. Then you take the fourth point and check, if this
point is outside the initial convex hull or not. If it is inside, go to the
fifth point. Otherwise the initial convex hull is to be rebuild. Assume, that
the only segment number two (from point 2 to 3) is visible from point number 4.
In this case, segment 2 needs to be excluded from the convex hull and replaced
by two segments: from point 2 to 4 and from 4 to 3. In that case you will have
four segments. If two
  segments are visible from point number 4 (for example, segments 2 and 3) the
point number 3 is to be excluded from convex hull and replaced by point number
4. To check if some point is inside or outside an initial convex hull is rather
simple procedure. Each segment has its own direction (one may say, that it is a
vector). So each segment belongs to infinite straight oriented line. One needs
to check point 4 for each line- where this point is placed- to the left side of
a line or to the right. One needs to create a list for point 4 with its
orientations. If this list is (left, left, left) it means that point 4 is inside
the initial convex hull. If the list is the next (left, right, left) it means
that point 4 is outside, segment 2 is visible from point 4 and is to be
replaced. (left, right, right) means that point 4 is outside, two segments are
visible and are to be replaced. Of course, (right, right, right) is impossible.
Hope, I've explained this
  method enough good- English isn't my mother's tongue.




       ________________________________________________________
   Yahoo!?
   . Yahoo! ! http://ru.mail.yahoo.com

#63326 From: "Francis Hemsher" <fhemsher@...>
Date: Mon Feb 8, 2010 10:45 pm
Subject: Re: Parameterized Symbols
fhemsher
Offline Offline
Send Email Send Email
 
Hi Kevin,

Your app is a natural for dynamic SVG. It can take a chunk of data and build the
element inside the SVG document. I mostly use xml data to create an SVG image at
the client.

Using Internet Explorer, with Adobe SVG Viewer Add-on, please take a look at:
http://www.mobiusPortal.com

It shows the interaction with xml data and svg imagery.

Regards,
Francis

---"Kevin Myers" <kmyers1@...> wrote:
>
> I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way.  This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.
>
> This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget.  So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget.  Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets".  So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.
>
> On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files.  So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.
>
> On the other hand, perhaps I am misinterpreting what you meant by "on a call
for this, clone the symbol...".  Is there a way to define what you described
within the SVG itself, rather than cloning the symbol and modifying its
attributes in the creating application?
>

#63325 From: "Kevin Myers" <kmyers1@...>
Date: Mon Feb 8, 2010 10:28 pm
Subject: Re: Re: Parameterized Symbols
myersoil1
Offline Offline
Send Email Send Email
 
Perhaps I should clarify a bit further on one point:  The widgets that I want to
define represent objects on maps and other complex technical drawings.  They
aren't the simple widgets typical of user interface definitions.

   ----- Original Message -----
   From: Kevin Myers
   To: svg-developers@yahoogroups.com
   Sent: Monday, February 08, 2010 16:10
   Subject: Re: [svg-developers] Re: Parameterized Symbols


   Hello Francis,

   Thanks for your suggestion, but no, I don't think that would meet my needs. 
Let me attempt to explain further...

   I have a database oriented program that knows a lot about the objects that it
wants to draw, but virtually nothing about how to draw them, and it needs to
essentially stay that way.  This program needs to be able to write SVG blocks
that essentially say something like "draw a widget at position x, y using
additional parameters a, b, c", then blindly include the necessary SVG blocks
that actually define how to accomplish drawing that widget and others.

   This program does not know, and further more preferably *should not* need to
know, anything about how to draw a specific widget.  So even though it might
conceivably be acceptable (up to a point) for this program to clone a widget
symbol or other SVG block, it would be inappropriate for this program to contain
the necessary logic that would make it smart enough to figure out how to change
attribute values for individual elements of the widget.  Furthermore, the
associated drawings are extremely large and complex, and may contain many
thousands of "widgets".  So it would be a huge disadvantage from a disk space
utilitization standpoint to actually need to clone all of the elements that make
up all occurances of each widget, even in a compressed form.

   On the other end, the actual drawing application that is used to render these
drawings could be any generic program that is designed to render SVG files.  So
there is no opportunity to somehow provide a fixup for this on the drawing end
of things, since the drawing program will not have any special knowledge
regarding the widgets in question.

   On the other hand, perhaps I am misinterpreting what you meant by "on a call
for this, clone the symbol...".  Is there a way to define what you described
within the SVG itself, rather than cloning the symbol and modifying its
attributes in the creating application?

   Hope that clarifies things.

   Kevin M.


     ----- Original Message -----
     From: Francis Hemsher
     To: svg-developers@yahoogroups.com
     Sent: Monday, February 08, 2010 15:32
     Subject: [svg-developers] Re: Parameterized Symbols



     Hi Kevin,

     I think I would try the following:

     1. create a 'base' symbol with all elements

     2. on a call for this, clone the symbol, and insert the needed attribute
values on its elements. Give the symbol a new id.

     3. create a use that calls the new symbol.

     Does that sound reasonable?

     Regards,
     Francis

     --- In svg-developers@yahoogroups.com, "Kevin M" <kmyers1@...> wrote:
     >
     > I would like to create some "symbol" definitions using SVG, where the
symbol requires more information than simple position, scaling, and
transformation in order to be drawn correctly. For example, let's assume that I
had a symbol representing a pipe. In order to be drawn correctly, this symbol
needs to know BOTH its inside and outside diameters. The outside diameter can be
effectively handled by simply scaling the symbol, but that won't size the inside
diameter properly. I need to be able to pass additional parameters, e.g. inside
diameter, to an SVG symbol, or some more or less equivalent construct in order
to handle this situation.
     >
     > Note: Please don't ask "Why don't you just draw two separate circles?".
The real symbols that I am working with are more complex than this simplistic
example. I need the ability to draw these more complex symbols potentially based
on multiple such additional parameters, and use something similar to symbols via
the USE construct so that the symbol definition doesn't need to be repeated as
would have to be done using Groups.
     >
     > Hope that makes sense. Any way to accomplish something like this?
     >
     > Thanks,
     > Kevin M.
     >





[Non-text portions of this message have been removed]

Messages 63325 - 63354 of 63354   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

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