How do I convert text into a SVG picture?

View: New views
7 Messages — Rating Filter:   Alert me  

How do I convert text into a SVG picture?

by Carl Aage Wangel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have converted a SVG picture to text and placed it in a document next to
the structure file. From there I import it into a text variable:

SVG_Doc:=Open document("Text_SVG_Picture.txt")

RECEIVE PACKET(SVG_Doc;SVG_Text;32000)

CLOSE DOCUMENT(SVG_Doc)

 

But how do I convert the text into a SVG picture?

I expect I need to use:

$svg:=DOM Create XML Ref(???)

SVG EXPORT TO PICTURE($svg;SVG_Picture;Copy XML Data Source )

 

No doubt I simple question, but help would be greatly appreciated.

Regards

Carl Aage Wangel

 

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: How do I convert text into a SVG picture?

by Christian Sakowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

you must use

DOCUMENT TO BLOB

and

BLOB TO PICTURE

--

Grüße/Regards,
[heubach-media] | Christian Sakowski
Christian.sakowski@...
iChat/AIM: SakowskiF
ICQ: 4thDimension (267537916)
Tel: 040/52 10 59-23



Am 31.10.2009 um 23:13 schrieb Carl Aage Wangel:

> I have converted a SVG picture to text and placed it in a document  
> next to
> the structure file. From there I import it into a text variable:
>
> SVG_Doc:=Open document("Text_SVG_Picture.txt")
>
> RECEIVE PACKET(SVG_Doc;SVG_Text;32000)
>
> CLOSE DOCUMENT(SVG_Doc)
>
>
>
> But how do I convert the text into a SVG picture?
>
> I expect I need to use:
>
> $svg:=DOM Create XML Ref(???)
>
> SVG EXPORT TO PICTURE($svg;SVG_Picture;Copy XML Data Source )
>
>
>
> No doubt I simple question, but help would be greatly appreciated.
>
> Regards
>
> Carl Aage Wangel
>
>
>
> **********************************************************************
> Get the speed and power of 4D v11 SQL
> before upgrade prices increase - http://www.4d.com
>
>
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4D.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4D_Tech-Unsubscribe@...
> **********************************************************************
>

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com


4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: How do I convert text into a SVG picture?

by Christian Sakowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Or you can use "READ PICTURE FILE"


Am 31.10.2009 um 23:17 schrieb Christian Sakowski:

> Hi,
>
> you must use
>
> DOCUMENT TO BLOB
>
> and
>
> BLOB TO PICTURE
>
> --
>
> Grüße/Regards,
> [heubach-media] | Christian Sakowski
> Christian.sakowski@...
> iChat/AIM: SakowskiF
> ICQ: 4thDimension (267537916)
> Tel: 040/52 10 59-23
>
>
>
> Am 31.10.2009 um 23:13 schrieb Carl Aage Wangel:
>
>> I have converted a SVG picture to text and placed it in a document  
>> next to
>> the structure file. From there I import it into a text variable:
>>
>> SVG_Doc:=Open document("Text_SVG_Picture.txt")
>>
>> RECEIVE PACKET(SVG_Doc;SVG_Text;32000)
>>
>> CLOSE DOCUMENT(SVG_Doc)
>>
>>
>>
>> But how do I convert the text into a SVG picture?
>>
>> I expect I need to use:
>>
>> $svg:=DOM Create XML Ref(???)
>>
>> SVG EXPORT TO PICTURE($svg;SVG_Picture;Copy XML Data Source )
>>
>>
>>
>> No doubt I simple question, but help would be greatly appreciated.
>>
>> Regards
>>
>> Carl Aage Wangel
>>
>>
>>
>> **********************************************************************
>> Get the speed and power of 4D v11 SQL
>> before upgrade prices increase - http://www.4d.com
>>
>>
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4D.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4D_Tech-Unsubscribe@...
>> **********************************************************************
>>
>
> **********************************************************************
> Get the speed and power of 4D v11 SQL
> before upgrade prices increase - http://www.4d.com
>
>
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4D.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4D_Tech-Unsubscribe@...
> **********************************************************************

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com


4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Parent Message unknown RE: How do I convert text into a SVG picture?

by Carl Aage Wangel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Christian,
That works fine, but I am going to use the SVG-text with 4D HTML Tags
(ending with a graph). I'm previously informed that it's necessary to use
PROCESS HTML TAGS and SVG EXPORT TO PICTURE (but how?).

Carl

-----Original Message-----

Subject: Re: How do I convert text into a SVG picture?
Date: Sat, 31 Oct 2009 23:17:07 +0100
From: Christian Sakowski <christian.sakowski@...>
To: 4D iNug Technical <4d_tech@...>
Message-ID: <79B1A405-0E47-4BF6-A34C-FC7AFA0C983C@...>

Hi,

you must use

DOCUMENT TO BLOB

and

BLOB TO PICTURE

--

Gr|_e/Regards,
[heubach-media] | Christian Sakowski
Christian.sakowski@...
iChat/AIM: SakowskiF
ICQ: 4thDimension (267537916)
Tel: 040/52 10 59-23

Am 31.10.2009 um 23:13 schrieb Carl Aage Wangel:

> I have converted a SVG picture to text and placed it in a document  
> next to
> the structure file. From there I import it into a text variable:
>
> SVG_Doc:=Open document("Text_SVG_Picture.txt")
>
> RECEIVE PACKET(SVG_Doc;SVG_Text;32000)
>
> CLOSE DOCUMENT(SVG_Doc)
>
> But how do I convert the text into a SVG picture?
>
> I expect I need to use:
>
> $svg:=DOM Create XML Ref(???)
>
> SVG EXPORT TO PICTURE($svg;SVG_Picture;Copy XML Data Source )
>
> No doubt I simple question, but help would be greatly appreciated.
>
> Regards
>
> Carl Aage Wangel


**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Parent Message unknown RE: How do I convert text into a SVG picture?

by Carl Aage Wangel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Christian
But I don't se quit how to make that useful. What I really would like to do
is to go from:
TEXT TO BLOB($in_text;$in;UTF8 text without length )
PROCESS HTML TAGS($in;$out)
VarHTML:=BLOB to text($out;UTF8 text without length )
To:
SVG EXPORT TO PICTURE(vRootRef;Picture;Copy XML Data Source )
But I just cant figure out how to get a valid root reference to the "SVG
text": VarHTML

-----Original Message-----
<Message: 8
<Subject: Re: How do I convert text into a SVG picture?
<Date: Sat, 31 Oct 2009 23:22:17 +0100
<From: Christian Sakowski <4d@...>
<To: 4D iNug Technical <4d_tech@...>
<Message-ID:
< <F90F636E-3B12-4E60-91B7-7CFB90FBE7AB@...>
<
<Or you can use "READ PICTURE FILE"



**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: How do I convert text into a SVG picture?

by MIYAKO :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm afraid there might be a slight misunderstanding of the command
  SVG EXPORT TO PICTURE.

I will reiterative what Christian has already pointed out,
but from a different perspective.

this command, formally named
  DOM EXPORT TO PICTURE
is a utility command for the DOM set of XML commands,
to simplify the procedure of converting an XML tree to SVG.
it not the only way to create an SVG,
but it does come in handy if you already have an SVG XML as DOM.

note on SVG:
there are two types of SVG in 4D v11 SQL,

1. animatable but not interactive,
2. interactive but not animatable.

"both animatable and interactive" should be coming in the next version.

1. you create with SVG EXPORT TO PICTURE,
with the option Get XML Data Source.
the receiving picture variable will display the rendered image,
but the XML continues to belong to the DOM command,
so by changing the DOM by command you effectively animate the SVG.

2. you create with SVG EXPORT TO PICTURE,
with the option Copy/Own XML Data Source,
or, alternatively,
BLOB TO PICTURE, READ PICTURE FILE, etc.
(i.e. any picture creating command)
the command SVG Find element ID by coordinates
is functional in this context, allowing the SVG to be interactive.

the command SVG EXPORT TO PICTURE,
is no different to the following two lines of code;

DOM EXPORT TO VARIABLE( $root; $blob )
BLOB TO PICTURE( $blob; $picture; ".svg" )

or
DOM EXPORT TO FILE( $root; $document )
READ PICTURE FILE( $document; $picture, ".svg" )

as you are working with PROCESS HTML TAGS,
and not DOM,
there is not reason to insist on SVG EXPORT TO PICTURE.

simply,

> PROCESS HTML TAGS($in;$out)
BLOB TO PICTURE( $out; $picture; ".svg" )

and you are done.

miyako

On 2009/11/04, at 6:49, Carl Aage Wangel wrote:

> Thanks Christian
> But I don't se quit how to make that useful. What I really would  
> like to do
> is to go from:
> TEXT TO BLOB($in_text;$in;UTF8 text without length )
> PROCESS HTML TAGS($in;$out)
> VarHTML:=BLOB to text($out;UTF8 text without length )
> To:
> SVG EXPORT TO PICTURE(vRootRef;Picture;Copy XML Data Source )
> But I just cant figure out how to get a valid root reference to the  
> "SVG
> text": VarHTML
>
> -----Original Message-----
> <Message: 8
> <Subject: Re: How do I convert text into a SVG picture?
> <Date: Sat, 31 Oct 2009 23:22:17 +0100
> <From: Christian Sakowski <4d@...>
> <To: 4D iNug Technical <4d_tech@...>
> <Message-ID:
> < <F90F636E-3B12-4E60-91B7-7CFB90FBE7AB@...>
> <
> <Or you can use "READ PICTURE FILE"
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Parent Message unknown RE: How do I convert text into a SVG picture?

by Carl Aage Wangel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you miyako for taking your time to clarify the use of SVG EXPORT TO
PICTURE. This is much appreciated. Saves me a lot of time and pain.
Thanks again
Carl



**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************