Re: [qooxdoo-devel] SVG contrib
>> The text to render is set via the "value" property for svg.text.Text > (acquired from svg.core.MTextContainer mixin). >> I doesn't show up in the API docs for svg.text.Text, but it works. > > The setValue and getValue methods are indeed the ones to use for text > content. I'm not sure why you don't see them in the API viewer; I can see > them in both release 0.2 and trunk. You need to look at the methods > though, > because it's not a property. > My bad. There is no "value" property, per se - only getter/setter for content of the SVG DOM element. Getter/setter are in API doc, as you say. >> One other thing I found while getting started with svg.text.Text: it > doesn't support any fill properties out of the box, >> so I just created a subclass to mix in svg.paint.MFillProperties, which > seemed to work OK for setting text colour. > > This is actually a design challenge that I face continuously. You will > find > many examples like this one in the contrib. > ... > If you (or anyone else!) have any thoughts on how it should work, they > would > be most welcome. ;) > FWIW, I reckon you're right to keep it simple. It would seem that one goal of any SVG wrapper would be to hide some complexity, something your contrib does admirably. If you roll out additional attribute sets as mixins, it's simple enough to subclass as needed. My only suggestion at the moment would be to mix in svg.paint.MFillProperties and svg.paint.MStrokeProperties into svg.text.Text. Although the necessary subclass is trivial, it would be helpful to have to ability to set text colour, opacity, etc. out of the box. I think that's something new users might take for granted, particularly when transferring apps from dojo.gfx and Raphael.js. >> Set the "y" property of your text element to >=20. That property sets >> the > text baseline, >> so when it's =0, your text element is in the DOM but just out of view. > > Actually, SVG allows you to set the text baseline with the > alignment-baseline, dominant-baseline, and a few other properties. See the > ... > Derrell: Beware my oversimplification. The text display is subject to the baseline properties that Marc mentioned. To oversimplify again, the default baseline for the L-to-R text in your example aligns with the font (sort of like in a word processor), so "y" does mark the baseline, but that won't always be the case. As a demonstration, in your example, set y=0 and "hello world" to "hello gyro" and you'll see the g and y descenders below the baseline peeking into your browser window. -- View this message in context: http://qooxdoo.678.n2.nabble.com/SVG-contrib-tp6562957p6564511.html Sent from the qooxdoo mailing list archive at Nabble.com. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
> The text to render is set via the "value" property for svg.text.Text (acquired from svg.core.MTextContainer mixin). > I doesn't show up in the API docs for svg.text.Text, but it works. The setValue and getValue methods are indeed the ones to use for text content. I'm not sure why you don't see them in the API viewer; I can see them in both release 0.2 and trunk. You need to look at the methods though, because it's not a property. > One other thing I found while getting started with svg.text.Text: it doesn't support any fill properties out of the box, > so I just created a subclass to mix in svg.paint.MFillProperties, which seemed to work OK for setting text colour. This is actually a design challenge that I face continuously. You will find many examples like this one in the contrib. The amount of available attributes for SVG elements is enormous. The Group element is a good example of it: it has almost no attributes of its own, but you can set almost every attribute in existence on it, which will be inherited by every element it contains. If I would include all available properties in the elements out of the box, the qooxdoo objects (and API) would become huge (near a hundred properties each, if not more). So I try to find a balance. Your solution of subclassing to include an extra mixin sounds like the perfect way to handle it. I do have plans to greatly extend the API to include a much larger part of the SVG standard. Currently I´m too pressed for time (I'm in the finishing stage of my studies), but I do want to start extending the contrib around September/October. My ultimate goal is to get close to supporting 100% of the elements, attributes and interfaces, so there will be a LOT more. There's a pretty clear inheritance tree in the SVG standard which I plan to mimic in the contrib. If you (or anyone else!) have any thoughts on how it should work, they would be most welcome. ;) > Set the "y" property of your text element to >=20. That property sets the text baseline, > so when it's =0, your text element is in the DOM but just out of view. Actually, SVG allows you to set the text baseline with the alignment-baseline, dominant-baseline, and a few other properties. See the W3 specification [1] for more info. The contrib doesnt provide an interface for these attributes (yet!), but you can set them with the normal setAttribute method that comes from qx.html.Element. Regards, Marc [1] http://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
On Fri, Jul 8, 2011 at 14:28, dinkypumpkin wrote: > Set the "y" property of your text element to >=20. That property sets the > text baseline, so when it's =0, your text element is in the DOM but just > out > of view. No magic. That makes perfect sense, and it's now working. Thank you very much. Derrell -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
Set the "y" property of your text element to >=20. That property sets the text baseline, so when it's =0, your text element is in the DOM but just out of view. Derrell Lipman wrote: > > Thanks. That's useful information! I still can't get any text to appear, > however. Do you happen to have a tiny example that causes text to display? > Or, can you tell me what I need to change in the following to get text to > show up? I must be missing something simple, but I don't see it. > -- View this message in context: http://qooxdoo.678.n2.nabble.com/SVG-contrib-tp6562957p6563566.html Sent from the qooxdoo mailing list archive at Nabble.com. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
On Fri, Jul 8, 2011 at 13:39, dinkypumpkin wrote:
> The text to render is set via the "value" property for svg.text.Text
> (acquired from svg.core.MTextContainer mixin). I doesn't show up in the
> API
> docs for svg.text.Text, but it works. One other thing I found while
> getting
> started with svg.text.Text: it doesn't support any fill properties out of
> the box, so I just created a subclass to mix in svg.paint.MFillProperties,
> which seemed to work OK for setting text colour.
Thanks. That's useful information! I still can't get any text to appear,
however. Do you happen to have a tiny example that causes text to display?
Or, can you tell me what I need to change in the following to get text to
show up? I must be missing something simple, but I don't see it.
qx.Class.define("svg.demo.Application",
{
extend : qx.application.Standalone,
members :
{
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Environment.get("qx.debug"))
{
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle
visibility
qx.log.appender.Console;
}
this._addCircle();
},
_addCircle : function()
{
var doc = this.getRoot();
var svgWidget = new svg.embed.Svg();
doc.add(svgWidget,
{
left : 0,
right : 0,
top: 0,
bottom : 0
});
var svgroot = svgWidget.getSvg();
// create a defs section
var defs = new svg.struct.Defs();
svgroot.add(defs);
// prepare a group for the circle chunks
var circleGroup = new svg.struct.Group();
circleGroup.setId("circle");
svgroot.add(circleGroup);
// create the big chunk
var bigChunk = new svg.path.Path();
bigChunk.setStroke("black");
bigChunk.setStrokeWidth(2);
bigChunk.setFill("red");
circleGroup.add(bigChunk);
// create the pathdata for the big chunk
var bigChunkPD = new svg.path.PathData();
bigChunkPD.moveTo(300, 200);
bigChunkPD.lineTo(-150, 0, true);
bigChunkPD.arc(150, 150, 0, true, false, 150, -150, true);
bigChunkPD.closePath();
// apply the big chunk path data
bigChunk.setPathData(bigChunkPD);
// create a piece of text
var text = new svg.text.Text();
text.set(
{
value : "hello world",
x : 0,
y : 0,
fontFamily : "serif",
fontStyle : "normal",
fontWeight : "normal",
fontSize : 20
});
svgroot.add(text);
/*
svgWidget.addListener(
"appear",
function(e)
{
this.setValue("hi there");
},
text);
*/
}
}
});
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
The text to render is set via the "value" property for svg.text.Text (acquired from svg.core.MTextContainer mixin). I doesn't show up in the API docs for svg.text.Text, but it works. One other thing I found while getting started with svg.text.Text: it doesn't support any fill properties out of the box, so I just created a subclass to mix in svg.paint.MFillProperties, which seemed to work OK for setting text colour. -- View this message in context: http://qooxdoo.678.n2.nabble.com/SVG-contrib-tp6562957p6563396.html Sent from the qooxdoo mailing list archive at Nabble.com. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
On Fri, Jul 8, 2011 at 12:05, Mustafa Sak wrote:
> ** **
>
> Hi Derrell,
>
> Hi Marc,
>
> ** **
>
> in a few month ago I used to rotate Text in SVG like this:
>
> ** **
>
> var canvas1 = new qx.ui.embed.Canvas().set(
>
>
Thanks, Mustafa. Unfortunately, your answer pertains to Canvas, not to SVG,
which is a different technology.
Derrell
> {
>
> width : 35,
>
> canvasWidth : 35,
>
> canvasHeight : 160,
>
> syncDimension : true
>
> });
>
> ** **
>
> canvas1.addListener("redraw", function(e)
>
> {
>
> var data = e.getData();
>
> var ctx = data.context;
>
> ** **
>
> var unitstr = “Text here!!”;
>
> ctx.save();
>
> ctx.translate(25, 140);
>
> ctx.rotate(-90 * Math.PI / 180);
>
> ctx.font = "19px 'Arial'";
>
> ctx.fillStyle = "rgba(0, 0, 200, 1)";
>
> ctx.fillText(unitstr, 0, 0);
>
> ** **
>
> //ctx.transform(1, 0, -1, 0, 0, 0);
>
> ctx.restore();
>
> },
>
> this);
>
> ** **
>
> May be usefull.
>
> ** **
>
> ** **
>
>
>
> ** **
>
> *SAKsystems*
>
> Inh. **Mustafa Sak**
>
> Varrelmannstr. 16
>
> 30453 Hannover
>
> Tel. +49 511 / 165 969 40
>
> Fax +49 511 / 165 969 49
>
> Mobil +49 163 / 312 6144
>
> http://www.saksys.de
>
> [email protected]
>
> STEUER-Nr. 2613817458
>
> ** **
> --
>
> *Von:* Derrell Lipman [mailto:[email protected]]
> *Gesendet:* Freitag, 8. Juli 2011 17:38
> *An:* **qooxdoo Development**
> *Betreff:* [qooxdoo-devel] SVG contrib
>
> ** **
>
> Hi Marc,
>
> ** **
>
> I'm looking to use your SVG contrib for a project requiring SVG text. There
> does not appear to be an interface for specifying _what_ text to render, and
> neither of the examples use text.
>
> ** **
>
> Is this an oversight, or are you expecting that the user will do low-level
> SVG manipulation? If you happen to have an example that shows using text
> with your SVG contrib, I'd love to see it.
>
> ** **
>
> Thanks!
>
> ** **
>
> Derrell
>
> ** **
>
>
> --
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib
Hi Derrell,
Hi Marc,
in a few month ago I used to rotate Text in SVG like this:
var canvas1 = new qx.ui.embed.Canvas().set(
{
width : 35,
canvasWidth : 35,
canvasHeight : 160,
syncDimension : true
});
canvas1.addListener("redraw", function(e)
{
var data = e.getData();
var ctx = data.context;
var unitstr = "Text here!!";
ctx.save();
ctx.translate(25, 140);
ctx.rotate(-90 * Math.PI / 180);
ctx.font = "19px 'Arial'";
ctx.fillStyle = "rgba(0, 0, 200, 1)";
ctx.fillText(unitstr, 0, 0);
//ctx.transform(1, 0, -1, 0, 0, 0);
ctx.restore();
},
this);
May be usefull.
SAKsystems
Inh. Mustafa Sak
Varrelmannstr. 16
30453 Hannover
Tel. +49 511 / 165 969 40
Fax +49 511 / 165 969 49
Mobil +49 163 / 312 6144
http://www.saksys.de
[email protected]
STEUER-Nr. 2613817458
_
Von: Derrell Lipman [mailto:[email protected]]
Gesendet: Freitag, 8. Juli 2011 17:38
An: qooxdoo Development
Betreff: [qooxdoo-devel] SVG contrib
Hi Marc,
I'm looking to use your SVG contrib for a project requiring SVG text. There
does not appear to be an interface for specifying _what_ text to render, and
neither of the examples use text.
Is this an oversight, or are you expecting that the user will do low-level
SVG manipulation? If you happen to have an example that shows using text
with your SVG contrib, I'd love to see it.
Thanks!
Derrell
<>--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] svg contrib: set bounds of canvas
Hi Eduard,
On 28-6-2011 15:10, Eduard Gamonal wrote:
>
>> The contrib provides a conversion class [2] that you can use to convert
>> client coordinates to svg coordinates and vice versa. The functions here
>> take in account any transformations and viewboxes that were applied.
> I read somewhere that I have to use svg contrib 0.1 with qooxdoo 1.3.
> does this restriction still apply?
>
Yes, that hasn't been changed. However, if I recall correctly, the only
thing that causes issues with qooxdoo 1.3, are the various calls to:
qx.core.Environment.get("qx.debug")
which could be globally replaced by
qx.core.Variant.isSet("qx.debug", "on")
If you're using a local copy of the contrib, you could consider
replacing those calls (although it's ugly).
Another option would be to write your own conversion. Especially since
you have to deal with eyeOS's coordinates, that might even be a better
solution in terms of performance. The calculations done by the contrib
are pretty straightforward [1] and not hard to implement in your own
code. I used the technique that's described here [2].
Regards,
Marc
[1]
http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/SVG/trunk/source/class/svg/coords/Convert.js?revision=21241&view=markup
[2]
http://www.codedread.com/blog/archives/2005/12/21/how-to-enable-dragging-in-svg/
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] svg contrib: set bounds of canvas
hey, > The width/height attributes of the svg *element* are kept in sync with > the width/height properties of the SVG *widget*. This is qooxdoo's > default behaviour for widgets. > that makes sense. my svg widget was in a container with flex:1, which makes it fill the whole area. > > However, when you start using mouse coordinates (which you probably are, > in a drawing app), you're introducing a second coordinate space, because > mouse coordinates are relative to the screen or the document/client, not > to the svg element. it's even funnier: eyeOS has its own coordinate space, but I found a work around for that. > > The contrib provides a conversion class [2] that you can use to convert > client coordinates to svg coordinates and vice versa. The functions here > take in account any transformations and viewboxes that were applied. I read somewhere that I have to use svg contrib 0.1 with qooxdoo 1.3. does this restriction still apply? that helped me a lot. thanks! -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] svg contrib: set bounds of canvas
Hi Eduard, On 06/28/2011 01:14 PM, Eduard Gamonal wrote: > 1. > I'd like to allow the user to paint *only* on given area, for example > on a rectangle region that fills 2/3 of the window. > I create an svg.embed.Svg() widget and I can draw, but the canvas > expands automatically and annoys me. I'd like this region to always > be, say, 800px wide and 400px high. > I set the height and width properties of svg (mySvgWidget.getSvg() ) > but it still expands. maybe it has to do with the viewPort? The width/height attributes of the svg *element* are kept in sync with the width/height properties of the SVG *widget*. This is qooxdoo's default behaviour for widgets. To limit the size of the widget, you can use the same layout properties as you would on any other widget. In your case, you'll most likely want to use the maxWidth/maxHeight properties of the widget. Or you can use some advanced layout managers. Note that these properties are not visible in the SVG api viewer, because they're external to the contrib. To see everything that's available to the svg.embed.Svg, see the api doc for widgets [1]. (make sure Inherited members are shown). > 2. if I use viewBox, so my background picture (in this svg widget) is > resized with the window, the free drawing part of my program messes > the coordinates. can I get the transform matrix that was internally > generated [1] for this viewBox? > As long as you keep all your calculations in svg coordinate space (called userspace), you won't have to do any conversions, even after applying viewboxes, transformations etc. However, when you start using mouse coordinates (which you probably are, in a drawing app), you're introducing a second coordinate space, because mouse coordinates are relative to the screen or the document/client, not to the svg element. The contrib provides a conversion class [2] that you can use to convert client coordinates to svg coordinates and vice versa. The functions here take in account any transformations and viewboxes that were applied. If you want to do the calculations yourself, there are a few ways to get a transformation matrix, provided by MLocatable [3] which is included by most elements. But you probably don't need that any more if you use the Convert class methods. Regards, Marc [1] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget [2] http://demo.qooxdoo.org/contrib/demobrowser/demo/SVG/trunk/api/#svg.coords.Convert [3] http://demo.qooxdoo.org/contrib/demobrowser/demo/SVG/trunk/api/#svg.core.dom.MLocatable -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Marc Puts wrote: > It could be helpful to inspect your page using the firebug addon. If you > highlight the SVG tag on the HTML tab, it would be interesting to know > if the element is marked on the page. Something that I noticed, is that > in some cases the SVG appears with a width+height of zero, even if > height and width have been explicitly set. > Yes, i use Firebug: the svg result correctly loaded but his size is 0x0:/ Qx app seems correctly loaded (i don't see any message like warning or other). Probably some bug in the Firefox lib (at least in this version) but i think that the problem is not concerning your contrib but SVG itself. However, your contrib give us (me and spandolfo) a big hand for our project. Probably we will introduce some new feature for support it. See ya ;) -- View this message in context: http://qooxdoo.678.n2.nabble.com/SVG-contrib-Could-not-determine-current-revision-of-SVG-trunk-tp5701382p5709352.html Sent from the qooxdoo mailing list archive at Nabble.com. -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Hi Daniele, > However, in Firefox 3.6 I don't see anything (blank page) but in other > browser (like Google Chrome or Opera) I see the svg file correctly. > Something missing? > By blank page, do you mean the SVG drawing is not being shown? Or is your qx app not loading at all? Your code seems allright. If it's not working in firefox, it could be a bug in the library, or a difference in implementation between firefox and the other browsers. I know that there are more similar problems; for example, the freedraw demo I created does not work in all browsers either. I haven't been able yet to find out why, but it's definately something I want to fix. It could be helpful to inspect your page using the firebug addon. If you highlight the SVG tag on the HTML tab, it would be interesting to know if the element is marked on the page. Something that I noticed, is that in some cases the SVG appears with a width+height of zero, even if height and width have been explicitly set. This could be your problem too. Actually, I think that's the problem the freedraw demo has too. > Another question: How can I interact with the SVG property? Example: I want > change a fill value from a specific tag definied into svg file. > > Hmm, I do know that the element (svg.struct.Use) can set properties of external tags, but it can't include entire files, only a selection of it. I'm not sure if the element can do this. So far, I only focussed on SVG drawings that were entirely generated by the lib. I haven't worked with external files yet. If you can find out how to do it with plain SVG, using the library to do the same will probably be straightforward. > Thanks for your help ;) > Daniele > You're welcome. I hope this mail was helpful at all. ;) As I said earlier in this thread, the svglib is still in a very early stage, and I probably won't be able to work on it until late January. If you should find a way to solve your problem, though, please let me know! Regards, Marc -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Hi Marc,
I'm looking for the same question.
I'm trying to import an external svg into my qooxdoo application.
This is a very simple code:
= from Application.js =
var svgWidget = new svg.embed.Svg();
var svgroot = svgWidget.getSvg();
var image = new svg.struct.Image();
image.setHref(qx.util.ResourceManager.getInstance().toUri("myfile.svg"));
image.setWidth(707);
image.setHeight(276);
svgroot.add(image);
this.getRoot().add(svgWidget,
{
left : 0,
right : 0,
top: 0,
bottom : 0
});
=
However, in Firefox 3.6 I don't see anything (blank page) but in other
browser (like Google Chrome or Opera) I see the svg file correctly.
Something missing?
Another question: How can I interact with the SVG property? Example: I want
change a fill value from a specific tag definied into svg file.
Thanks for your help ;)
Daniele
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/SVG-contrib-Could-not-determine-current-revision-of-SVG-trunk-tp5701382p5708171.html
Sent from the qooxdoo mailing list archive at Nabble.com.
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Thanks Marc,
For your reply and your contrib :)
Regards
Sp
Il giorno gio, 04/11/2010 alle 15.16 +0100, Marc Puts ha scritto:
> The href property can take two types of values: it can either be an
> instance of svg.core.Element, or a string. If your case you'll want a
> string.
>
> If you pass a string, then it must be the exact value of the xlink:href
> attribute:
>
> img.setHref("http://test.com/your-svg-file.svg";);
> or
> img.setHref("url('http://test.com/your-svg-file.svg')");
>
> If your svg file is in your project's resource folder, you can use the
> standard qooxdoo way to get its uri, as described here:
> http://manual.qooxdoo.org/1.2.x/pages/gui_toolkit/ui_resources.html#obtaining-the-url-for-a-resource
>
> Also important to know is that the default width and height of the image
> element are 0. So you have to manually set the dimensions, they are not
> automatically taken from the image file.
>
>
>
> Regards,
> Marc
>
>
>
>
> On 11/04/2010 02:01 PM, Simone Pandolfo wrote:
> > Thank You Marc for the usefull informations,
> > But i missing a point, how i can set the path of the svg file?
> > In the properties of struct.Image there is href, but i see reference
> > only for elements.
> >
> > Regards,
> > Sp
> >
>
>
> --
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> ___
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
The href property can take two types of values: it can either be an
instance of svg.core.Element, or a string. If your case you'll want a
string.
If you pass a string, then it must be the exact value of the xlink:href
attribute:
img.setHref("http://test.com/your-svg-file.svg";);
or
img.setHref("url('http://test.com/your-svg-file.svg')");
If your svg file is in your project's resource folder, you can use the
standard qooxdoo way to get its uri, as described here:
http://manual.qooxdoo.org/1.2.x/pages/gui_toolkit/ui_resources.html#obtaining-the-url-for-a-resource
Also important to know is that the default width and height of the image
element are 0. So you have to manually set the dimensions, they are not
automatically taken from the image file.
Regards,
Marc
On 11/04/2010 02:01 PM, Simone Pandolfo wrote:
> Thank You Marc for the usefull informations,
> But i missing a point, how i can set the path of the svg file?
> In the properties of struct.Image there is href, but i see reference
> only for elements.
>
> Regards,
> Sp
>
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Thank You Marc for the usefull informations, But i missing a point, how i can set the path of the svg file? In the properties of struct.Image there is href, but i see reference only for elements. Regards, Sp Il giorno gio, 04/11/2010 alle 13.49 +0100, Marc Puts ha scritto: > Hi Simone, > > You can indeed use svg.struct.Image to embed an external raster or SVG file. > > You can also use svg.struct.Use to reuse part of an external SVG file. > This requires that the part you want to include has its "id" attribute set. > The tag allows you to manipulate properties of the included > elements, but I'm not sure if that's possible with the tag. > > Regards, > Marc > > > On 11/04/2010 12:16 PM, Simone Pandolfo wrote: > > Hi Marc, > > > > I have installed the SVG contrib and work fine, i need this contrib for > > import an svg file and after manipulate few property node, like fill, > > opacity or height. > > > > I have generated the api and i am trying to use the svg.struct.Image for > > this purpose. is it correct? have you any suggestion about? > > > > Regards > > Sp > > > > > -- > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > ___ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Hi Simone, You can indeed use svg.struct.Image to embed an external raster or SVG file. You can also use svg.struct.Use to reuse part of an external SVG file. This requires that the part you want to include has its "id" attribute set. The tag allows you to manipulate properties of the included elements, but I'm not sure if that's possible with the tag. Regards, Marc On 11/04/2010 12:16 PM, Simone Pandolfo wrote: > Hi Marc, > > I have installed the SVG contrib and work fine, i need this contrib for > import an svg file and after manipulate few property node, like fill, > opacity or height. > > I have generated the api and i am trying to use the svg.struct.Image for > this purpose. is it correct? have you any suggestion about? > > Regards > Sp > -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Hi Marc, I have installed the SVG contrib and work fine, i need this contrib for import an svg file and after manipulate few property node, like fill, opacity or height. I have generated the api and i am trying to use the svg.struct.Image for this purpose. is it correct? have you any suggestion about? Regards Sp -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
On 11/3/10 2:16 PM, thron7 wrote: > This allows you to check the current revision, and also to download a > tarball with the contrib. Just switch to e.g. the 'trunk' directory and > hit "Download GNU tarball". Then you can unpack it to your local disk > and just point the "manifest" entry in your config.json to the > corresponding path. Sounds good, I'll give that a try. > You lose the automatic checking for a newer version, > though :-(. But maybe that's the lesser problem, contribs are usually > not updated that fast, and you can always check and re-download by hand. True. Not really an issue here anyway since we plan on building/extending a theme. Thank you. -- Felipe D. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
On 11/03/2010 06:03 PM, Felipe Delgado wrote: > On 11/3/10 10:39 AM, thron7 wrote: >> Chances are that you just ran into a peak traffic situation with >> Sourceforge. When their servers are really loaded the request might time >> out and you get the above error message. Just re-try. > > I've had the same issue with DarkTheme all morning. From when I > generate.py source: > > >>> Resolving libs/manifests... >- job 'source::source-script' > - Checking network-based contrib: DarkTheme/trunk > [Errno 54] Connection reset by peer > > (Sometimes the error does not even appear, the script just gets stalled > on that last step.) > > Is there any way to check the status of the availability of these > contribs at any certain point? > > You can always use Sourceforge's Web-based repository browser, e.g. for the SVN contrib under http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/SVG/ (The link is easy to find on the contrib's entry on the project page, http://qooxdoo.org/contrib/project; it's the "(Browse)" link right to "SVN"). This allows you to check the current revision, and also to download a tarball with the contrib. Just switch to e.g. the 'trunk' directory and hit "Download GNU tarball". Then you can unpack it to your local disk and just point the "manifest" entry in your config.json to the corresponding path. You lose the automatic checking for a newer version, though :-(. But maybe that's the lesser problem, contribs are usually not updated that fast, and you can always check and re-download by hand. HTH, T. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
On 11/3/10 10:39 AM, thron7 wrote: > Chances are that you just ran into a peak traffic situation with > Sourceforge. When their servers are really loaded the request might time > out and you get the above error message. Just re-try. I've had the same issue with DarkTheme all morning. From when I generate.py source: >>> Resolving libs/manifests... - job 'source::source-script' - Checking network-based contrib: DarkTheme/trunk [Errno 54] Connection reset by peer (Sometimes the error does not even appear, the script just gets stalled on that last step.) Is there any way to check the status of the availability of these contribs at any certain point? -- Felipe D. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Thank you for the reply, Still have problem with the contrib installation, i try to start a new project to try again. I use qooxdoo 1.2.1. Il giorno mer, 03/11/2010 alle 17.21 +0100, Marc Puts ha scritto: > Hi Simone, > > Since I contributed the SVG lib, I guess I should try and answer this one. > > I'm not sure why you're having problems with the generator. I just tried > (with qooxdoo 1.2.1) and it seems to be working fine. What qooxdoo > version are you using? I hope some of the generator gurus on this list > can help with this. :) > > > The SVG library is still in a very early stage and does not have a lot > of features right now. For example, no text support is included yet. > Also, because of the early stage, anything can (and probably will) > change. Once the base is solid, I will tag it for a 0.1 release and > things should become more stable. Unfortunately, the project for which I > created it is temporarily on hold, which is why I didn't update it for a > while. I expect to pick up development again in late January, unless I > can find some spare time before that. > > As for documentation; It's true that I didn't create the wiki page yet. > I hope to get around to that shortly, but it will definately be there > before the 0.1 tag. > For now, I think you should start by looking at the two demo programs. > (see http://demo.qooxdoo.org/contrib/demobrowser/ ) > The default demo should make it clear how to include an SVG drawing into > your qx app along with some basic shapes. The freedraw demo shows how to > define and use the path element. I recommend you check out the source > code of both and have a look. > > Here's a little info for better understanding of the library core: > > You can include an SVG drawing into your application by adding the > svg.embed.Svg widget to it. The widget has a .getSvg() method which > returns an instance of svg.struct.Svg. This instance represents the > root element of your drawing. > > svg.core.Element subclasses qx.html.Element. Therefore, you can use all > (most?) of the features available to that. You can use those to > manipulate the entire SVG element tree. The main difference from > qx.html.Element, is that elements created with svg.core.Element are > created in the correct SVG namespace. This is required by browsers when > you mix SVG with XHTML. Therefore, all SVG elements created with this > lib are in fact svg.core.Element's. > In theory, the library is already capable of supporting the entire SVG > standard, because you can directly instantiate svg.core.Element and use > the setAttribute method to set the attributes. Because this is obviously > not very convenient, the library mostly consists of easier access to > these attributes, along with type and value checking. The > svg.path.PathData class takes this a bit further and is entirely devoted > to filling the "d" attribute of a element. The freedraw demo > shows this. > > Your next stop should be the API documentation of the SVG lib (generate > it by ./generate.py api) which is quite complete. The next best sources > for information would be learnsvg.com and the W3 SVG standard. You will > notice that the SVG library's packages closely match the W3 SVG standard. > > > Feel free to ask any questions you might have (either on the mailing > list or by direct mail). Suggestions and critics are always welcome too. :) > > Regards, > Marc > > > On 11/03/2010 02:48 PM, Simone Pandolfo wrote: > > I need to work with some svg files, and after some reserch i try to use > > this contrib, but after i have added in the config.json the row: > > > > "manifest" : "contrib://SVG/trunk/Manifest.json" > > > > the generate.py report this error: > > > > Could not determine current revision of "SVG/trunk" > > [Errno 2] No such file or directory: > > u'/tmp/cache/downloads/SVG/trunk/Manifest.json' > > > > > > How i can resolve this? and how can i find some information about this > > contrib? > > > > http://qooxdoo.org/contrib/project/svg report that the topic does not > > exist yet :/ > > > > Regards > > Sp > > > > > -- > Achieve Improved Network Security with IP and DNS Reputation. > Defend against bad network traffic, including botnets, malware, > phishing sites, and compromised hosts - saving your company time, > money, and embarrassment. Learn More! > http://p.sf.net/sfu/hpdev2dev-nov > ___ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Hi Simone, Since I contributed the SVG lib, I guess I should try and answer this one. I'm not sure why you're having problems with the generator. I just tried (with qooxdoo 1.2.1) and it seems to be working fine. What qooxdoo version are you using? I hope some of the generator gurus on this list can help with this. :) The SVG library is still in a very early stage and does not have a lot of features right now. For example, no text support is included yet. Also, because of the early stage, anything can (and probably will) change. Once the base is solid, I will tag it for a 0.1 release and things should become more stable. Unfortunately, the project for which I created it is temporarily on hold, which is why I didn't update it for a while. I expect to pick up development again in late January, unless I can find some spare time before that. As for documentation; It's true that I didn't create the wiki page yet. I hope to get around to that shortly, but it will definately be there before the 0.1 tag. For now, I think you should start by looking at the two demo programs. (see http://demo.qooxdoo.org/contrib/demobrowser/ ) The default demo should make it clear how to include an SVG drawing into your qx app along with some basic shapes. The freedraw demo shows how to define and use the path element. I recommend you check out the source code of both and have a look. Here's a little info for better understanding of the library core: You can include an SVG drawing into your application by adding the svg.embed.Svg widget to it. The widget has a .getSvg() method which returns an instance of svg.struct.Svg. This instance represents the root element of your drawing. svg.core.Element subclasses qx.html.Element. Therefore, you can use all (most?) of the features available to that. You can use those to manipulate the entire SVG element tree. The main difference from qx.html.Element, is that elements created with svg.core.Element are created in the correct SVG namespace. This is required by browsers when you mix SVG with XHTML. Therefore, all SVG elements created with this lib are in fact svg.core.Element's. In theory, the library is already capable of supporting the entire SVG standard, because you can directly instantiate svg.core.Element and use the setAttribute method to set the attributes. Because this is obviously not very convenient, the library mostly consists of easier access to these attributes, along with type and value checking. The svg.path.PathData class takes this a bit further and is entirely devoted to filling the "d" attribute of a element. The freedraw demo shows this. Your next stop should be the API documentation of the SVG lib (generate it by ./generate.py api) which is quite complete. The next best sources for information would be learnsvg.com and the W3 SVG standard. You will notice that the SVG library's packages closely match the W3 SVG standard. Feel free to ask any questions you might have (either on the mailing list or by direct mail). Suggestions and critics are always welcome too. :) Regards, Marc On 11/03/2010 02:48 PM, Simone Pandolfo wrote: > I need to work with some svg files, and after some reserch i try to use > this contrib, but after i have added in the config.json the row: > > "manifest" : "contrib://SVG/trunk/Manifest.json" > > the generate.py report this error: > > Could not determine current revision of "SVG/trunk" > [Errno 2] No such file or directory: > u'/tmp/cache/downloads/SVG/trunk/Manifest.json' > > > How i can resolve this? and how can i find some information about this > contrib? > > http://qooxdoo.org/contrib/project/svg report that the topic does not > exist yet :/ > > Regards > Sp > -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Re: [qooxdoo-devel] SVG contrib: Could not determine current revision of "SVG/trunk"
Simone, On 11/03/2010 02:48 PM, Simone Pandolfo wrote: > I need to work with some svg files, and after some reserch i try to use > this contrib, but after i have added in the config.json the row: > > "manifest" : "contrib://SVG/trunk/Manifest.json" > > the generate.py report this error: > > Could not determine current revision of "SVG/trunk" > [Errno 2] No such file or directory: > u'/tmp/cache/downloads/SVG/trunk/Manifest.json' I just tried it and it worked fine. Which qooxdoo version are you using? Chances are that you just ran into a peak traffic situation with Sourceforge. When their servers are really loaded the request might time out and you get the above error message. Just re-try. > > > How i can resolve this? and how can i find some information about this > contrib? Other than looking at the repository files (e.g. readme.txt), you could try its demos: http://demo.qooxdoo.org/contrib/demobrowser/#SVG > > http://qooxdoo.org/contrib/project/svg report that the topic does not > exist yet :/ Yes, that's true. T. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
