Ref: Resize SVG_Use

2017-12-06 Thread truegold via 4D_Tech
Hi Miyako, I think if the image size were uniform in the document I could do that. But the same images can be size to different sizes in different parts of the svg doc. I might just decide to keep things as they were and laid an image as I need it. The worst case is that the same image is loade

Re: Ref: Resize SVG_Use

2017-12-05 Thread Keisuke Miyako via 4D_Tech
it depends on the document, but I would create a group in "defs" and apply the scaling and/or translation factor at the "defs" level. you can "use" a "g" in SVG. 2017/12/06 10:56、truegold via 4D_Tech <4d_tech@lists.4d.com> のメール: Are you say that I need to wrap each

Ref: Resize SVG_Use

2017-12-05 Thread truegold via 4D_Tech
uot;;$width;"height";$height) And then to access in later places in code: $glyph:=SVG_Use ($domSvg_ptr->;$whichAspect;0;0;0;0) And here are hundred of them in this svg document. Are you say that I need to wrap each occurrence of the SVG_Use within a group ? Than

Re: Ref: Resize SVG_Use

2017-12-05 Thread Keisuke Miyako via 4D_Tech
this is an SVG question, not a 4D question, but the answer is "yes". if you change the scale in transform then it applies to the coordinates you pass to translate and rotate. it also inherits the scaling resulting from scaling on parent elements as well as the viewBox/viewPort ratio at the top l

Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi, Does the SVG_SET_TRANSFORM_SCALE change the image size and also the the area size? In others words (even though the xml in the 4D SVG Viewer doesn’t show it) is 500 pixel width still 500 pixels after the size transform? Or is 500 * scale? I'm asking because as soon as I change the scale t

Re: Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi, As an aside I am testing in a small sample and opening inn the viewer. if I use this line: SVG_SET_TRANSFORM_TRANSLATE ($glyph;$inX;$inY) it works great! Starts the draw exactly at the x and y. But if I add this line: SVG_SET_TRANSFORM_SCALE ($glyph;$_w/$width;$_w/$height) Then it goes f

Re: Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi Miyako, > translate offsets the x/y by the value specified. > the x/y you pass are not absolute coordinates (unless, of course, the x/y in > element are 0,0) Agree! I have tested setting the x/y w/h to 0 thinking that it would apply correctly but the svg looks like this: >

Ref: Resize SVG_Use

2017-12-04 Thread truegold via 4D_Tech
Hi All, Note: If I apply the transform immediately after I create the symbol: $symbol:=DOM Create XML element($defs;"image";"id";$name;"xlink:href";$image;"x";0;"y";0;"width";$width;"height";$height) SVG_SET_TRANSFORM_SCALE ($symbol;18/$width;18/$height) That seems to work and w