Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:00 22 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMiteWeb with SVG Graphics

Author Message
aFox
Senior Member

Joined: 28/02/2023
Location: Germany
Posts: 108
Posted: 06:39pm 09 Mar 2023
Copy link to clipboard 
Print this post

PicoMiteWeb with SVG Graphics

Creating diagrams as bitmaps can be a challenge without a result.
But we have the vector graphic option as SVG code and/or files.

Dim myfloat!=16.123
Dim myint%=999
Dim mystring$="The PicoMite Web is GO!!!"

Are defined but not found in the source code of simpleweb.bas,
because you find thes variables within test4.html under
<h1>{mystring$}</h1>

Test of a float: myfloat is {myfloat!}


Test of an integer: myint is {myint%}


Test of a string: mystring is {DateTime$(now)}



So WEB transmit page a%,"test4.html" interprets and replaces as an example {<h1>{mystring$}</h1>} by the content of the known
variable mystring$ into <h1>The PicoMite Web is GO!!!</h1> automatically.

That can be used to integrate SVG graphics directly within the a HTML file.
See
https://www.w3schools.com/graphics/svg_inhtml.asp
and
https://www.freecodecamp.org/news/use-svg-images-in-css-html/

But you can also create a separate SVG file and transmit by:
WEB Transmit FILE a%,"rulers.svg","image/svg+xml"

Here is a BASIC example manly created by Aat written in OliBasic for Android at
https://www.tapatalk.com/groups/rfobasic/generating-a-pdf-t6255.html#p47019

This example should be readable for BASIC programmers.
I have to explain that the function WORD$(GrTextDraw$,3,",") returns the third text part of the CSV string GrTextDraw$ delimited by ",".

One of the results




Happy coding
Gregor
Edited 2023-03-10 04:44 by aFox
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1682
Posted: 07:36pm 09 Mar 2023
Copy link to clipboard 
Print this post

  aFox said  PicoMiteWeb with SVG Graphics

Creating diagrams as bitmaps can be a challenge without a result.
But we have the vector graphic option as SVG code and/or files. ...

Very interesting!

  Quote  I have to explain that the function WORD$(GrTextDraw$,3,",") returns the third text part of the CSV string GrTextDraw$ delimited by ",".

It looks like the(CMM2)MMBasic Field$() function.
Returns a particular field in a string with the fields separated by delimiters.
'nbr' is the field to return (the first is nbr 1). 'string1' is the string to search
and 'string2' is a string holding the delimiters (more than one can be used).
'string3' is optional and if specified will include characters that are used to
quote text in 'string1' (ie, quoted text will not be searched for a delimiter).
For example:
S$ = "foo, boo, zoo, doo"
r$ = FIELD$(s$, 2, ",")
will result in r$ = "boo". While:
s$ = "foo, 'boo, zoo', doo"
r$ = FIELD$(s$, 2, ",", "'")
will result in r$ = "boo, zoo".

Regards
Michael
causality ≠ correlation ≠ coincidence
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025