diff --git a/Project/Sources/Methods/00_test.4dm b/Project/Sources/Methods/00_test.4dm
index 7aa7a5c..0e2abb9 100644
--- a/Project/Sources/Methods/00_test.4dm
+++ b/Project/Sources/Methods/00_test.4dm
@@ -1,19 +1,19 @@
//%attributes = {}
-C_BOOLEAN:C305($Boo_OK)
-C_LONGINT:C283($Lon_alignStart; $Lon_height; $Lon_i; $Lon_middleX; $Lon_middleY; $Lon_modules)
-C_LONGINT:C283($Lon_quiet; $Lon_recHeight; $Lon_recWidth; $Lon_size; $Lon_tx; $Lon_ty)
-C_LONGINT:C283($Lon_version; $Lon_width; $Lon_x; $Lon_y; $Lon_zoom)
-C_PICTURE:C286($Pic_buffer)
-C_TEXT:C284($Dom_arc; $Dom_buffer; $Dom_circle; $Dom_end; $Dom_filter; $Dom_g)
-C_TEXT:C284($Dom_gradient; $Dom_line; $Dom_main; $Dom_new; $Dom_node; $Dom_origine)
-C_TEXT:C284($Dom_path; $Dom_pattern; $Dom_picture; $Dom_point; $Dom_rect; $Dom_root)
-C_TEXT:C284($Dom_start; $Dom_svg; $Dom_symbol; $Dom_text; $Dom_use; $Txt_buffer)
-C_TEXT:C284($Txt_code; $Txt_color; $Txt_font; $Txt_inputData; $Txt_path; $Txt_source)
-C_TEXT:C284($Txt_style)
-C_OBJECT:C1216($Obj_buffer)
+var $Boo_OK : Boolean
+var $Lon_alignStart; $Lon_height; $i; $Lon_middleX; $Lon_middleY; $Lon_modules : Integer
+var $Lon_quiet; $Lon_recHeight; $Lon_recWidth; $Lon_size; $Lon_tx; $Lon_ty : Integer
+var $Lon_version; $Lon_width; $Lon_x; $Lon_y; $Lon_zoom : Integer
+var $Pic_buffer : Picture
+var $Dom_arc; $Dom_buffer; $Dom_circle; $end; $Dom_filter; $g : Text
+var $Dom_gradient; $line; $Dom_main; $Dom_new; $Dom_node; $Dom_origine : Text
+var $Dom_path; $Dom_pattern; $Dom_picture; $point; $Dom_rect; $Dom_root : Text
+var $start; $Dom_symbol; $Dom_text; $Dom_use; $t : Text
+var $Txt_code; $Txt_color; $Txt_font; $Txt_inputData; $Txt_path; $Txt_source : Text
+var $Txt_style : Text
+var $Obj_buffer : Object
-ARRAY LONGINT:C221($tLon_X; 0)
-ARRAY LONGINT:C221($tLon_Y; 0)
+ARRAY LONGINT:C221($_X; 0)
+ARRAY LONGINT:C221($_Y; 0)
ARRAY TEXT:C222($tDom_stop; 0)
ARRAY TEXT:C222($tTxt_classes; 0)
@@ -23,26 +23,40 @@ SVG_SET_OPTIONS
SVG_SET_OPTIONS(SVG_Get_options ?+ 5)
-$Dom_svg:=SVG_New
+var $svg : Text:=SVG_New
+// $Txt_pathDatas:=Choose:C955(($Num_stop-$Num_start)>180;$Txt_pathDatas+"1,1 ";$Txt_pathDatas+"0,1 ")
Case of
//______________________________________________________
: (True:C214)
- $Dom_picture:=SVG_New_image($Dom_svg; "#4DPop.png")
+ SVG_SET_OPTIONS(SVG_Get_options ?+ 2)
+
+ SVG_New_arc($svg; 300; 300; 40; 0; 105; "gray"; "lightcoral"; 1)
+ SVG_New_arc($svg; 300; 300; 40; 105; 138; "gray"; "lightskyblue"; 1)
+ SVG_New_arc($svg; 300; 300; 40; 138; 230; "gray"; "lightgreen"; 1)
+ SVG_New_arc($svg; 300; 300; 40; 230; 270; "gray"; "lightsteelblue"; 1)
+ SVG_New_arc($svg; 300; 300; 40; 270; 360; "gray"; "lightyellow"; 1)
+
+ $t:=SVG_Export_to_XML($svg)
+
+ //______________________________________________________
+ : (True:C214)
+
+ $Dom_picture:=SVG_New_image($svg; "#4DPop.png")
SVG_FADE_TO_GREY_SCALE($Dom_picture)
//______________________________________________________
- : (True:C214) //ACI0104291
+ : (True:C214) // ACI0104291
- $Dom_g:=SVG_New_group($Dom_svg; "bloc")
- SVG_SET_FONT_FAMILY($Dom_g; "times")
- SVG_SET_FONT_SIZE($Dom_g; 24)
- $Txt_buffer:=SVG_New_text($Dom_g; "Normal text"; 0; 20; "times"; 24; Normal:K14:15)
- $Txt_buffer:=SVG_New_text($Dom_g; "Bold text"; 0; 50; "times"; 24; 1)
- $Txt_buffer:=SVG_New_text($Dom_g; "Italic font style"; 0; 80; "times"; 24; 2)
- $Txt_buffer:=SVG_New_text($Dom_g; "Bold text + Italic font style"; 0; 110; "times"; 24; 1+2)
+ $g:=SVG_New_group($svg; "bloc")
+ SVG_SET_FONT_FAMILY($g; "times")
+ SVG_SET_FONT_SIZE($g; 24)
+ $t:=SVG_New_text($g; "Normal text"; 0; 20; "times"; 24; Normal:K14:15)
+ $t:=SVG_New_text($g; "Bold text"; 0; 50; "times"; 24; 1)
+ $t:=SVG_New_text($g; "Italic font style"; 0; 80; "times"; 24; 2)
+ $t:=SVG_New_text($g; "Bold text + Italic font style"; 0; 110; "times"; 24; 1+2)
//______________________________________________________
: (True:C214) // Marker - delete marker - delete element with SVG_CLEAR
@@ -50,56 +64,56 @@ Case of
SVG_SET_DEFAULT_BRUSHES("red"; "red")
// Définir un cercle pour marquer les points
- $Dom_point:=SVG_Define_marker($Dom_svg; "pointMarker"; 2; 2; 3; 3)
- SVG_SET_VIEWBOX($Dom_point; 0; 0; 4; 4)
- SVG_New_circle($Dom_point; 2; 2; 1)
+ $point:=SVG_Define_marker($svg; "pointMarker"; 2; 2; 3; 3)
+ SVG_SET_VIEWBOX($point; 0; 0; 4; 4)
+ SVG_New_circle($point; 2; 2; 1)
// Définir un carré pour le point de début
- $Dom_start:=SVG_Define_marker($Dom_svg; "startMarker"; 1; 1; 2; 2)
- SVG_New_rect($Dom_start; 0; 0; 2; 2)
+ $start:=SVG_Define_marker($svg; "startMarker"; 1; 1; 2; 2)
+ SVG_New_rect($start; 0; 0; 2; 2)
// Définir un triangle pour le point de fin
- $Dom_end:=SVG_Define_marker($Dom_svg; "endMarker"; 5; 5; 3; 3; 60)
- SVG_SET_VIEWBOX($Dom_end; 0; 0; 10; 10)
- SVG_New_regular_polygon($Dom_end; 10; 3)
+ $end:=SVG_Define_marker($svg; "endMarker"; 5; 5; 3; 3; 60)
+ SVG_SET_VIEWBOX($end; 0; 0; 10; 10)
+ SVG_New_regular_polygon($end; 10; 3)
// Axe des x
- For ($Lon_i; 0; 200; 20)
+ For ($i; 0; 200; 20)
- APPEND TO ARRAY:C911($tLon_X; $Lon_i+10)
+ APPEND TO ARRAY:C911($_X; $i+10)
End for
// Données
- APPEND TO ARRAY:C911($tLon_Y; 100)
- APPEND TO ARRAY:C911($tLon_Y; 100)
- APPEND TO ARRAY:C911($tLon_Y; 30)
- APPEND TO ARRAY:C911($tLon_Y; 30)
- APPEND TO ARRAY:C911($tLon_Y; 80)
- APPEND TO ARRAY:C911($tLon_Y; 60)
- APPEND TO ARRAY:C911($tLon_Y; 10)
- APPEND TO ARRAY:C911($tLon_Y; 40)
- APPEND TO ARRAY:C911($tLon_Y; 50)
- APPEND TO ARRAY:C911($tLon_Y; 70)
- $Dom_line:=SVG_New_polyline_by_arrays($Dom_svg; ->$tLon_X; ->$tLon_Y; "red"; "none"; 5)
+ APPEND TO ARRAY:C911($_Y; 100)
+ APPEND TO ARRAY:C911($_Y; 100)
+ APPEND TO ARRAY:C911($_Y; 30)
+ APPEND TO ARRAY:C911($_Y; 30)
+ APPEND TO ARRAY:C911($_Y; 80)
+ APPEND TO ARRAY:C911($_Y; 60)
+ APPEND TO ARRAY:C911($_Y; 10)
+ APPEND TO ARRAY:C911($_Y; 40)
+ APPEND TO ARRAY:C911($_Y; 50)
+ APPEND TO ARRAY:C911($_Y; 70)
+ $line:=SVG_New_polyline_by_arrays($svg; ->$_X; ->$_Y; "red"; "none"; 5)
// Disposer les marqueurs :
- SVG_SET_MARKER($Dom_line; "startMarker"; "start")
- SVG_SET_MARKER($Dom_line; "pointMarker"; "middle")
- SVG_SET_MARKER($Dom_line; "endMarker"; "end")
+ SVG_SET_MARKER($line; "startMarker"; "start")
+ SVG_SET_MARKER($line; "pointMarker"; "middle")
+ SVG_SET_MARKER($line; "endMarker"; "end")
// Clear the pointMarker
- SVG_CLEAR($Dom_point)
+ SVG_CLEAR($point)
// Delete middle marker
- SVG_SET_MARKER($Dom_line; ""; "middle")
+ SVG_SET_MARKER($line; ""; "middle")
//________________________________________ ACI0103472
: (True:C214)
- $Dom_text:=SVG_New_text($Dom_svg; "underline & line-throught"; 10; 10; "Arial"; 24; 12)
- $Dom_text:=SVG_New_textArea($Dom_svg; "underline & line-throught"; 10; 40; -1; -1; "Arial"; 24; 12)
- $Dom_text:=SVG_New_text($Dom_svg; "tspan"; 10; 80; "Arial"; 24)
+ $Dom_text:=SVG_New_text($svg; "underline & line-throught"; 10; 10; "Arial"; 24; 12)
+ $Dom_text:=SVG_New_textArea($svg; "underline & line-throught"; 10; 40; -1; -1; "Arial"; 24; 12)
+ $Dom_text:=SVG_New_text($svg; "tspan"; 10; 80; "Arial"; 24)
$Dom_text:=SVG_New_tspan($Dom_text; "underline & line-throught"; 30; 130; "Arial"; -1; 12)
//________________________________________
@@ -113,15 +127,16 @@ Case of
TRANSFORM PICTURE:C988($Pic_buffer; Scale:K61:2; 0.5; 0.5)
- $Dom_picture:=SVG_New_embedded_image($Dom_svg; $Pic_buffer)
- //SVG_ROTATION_CENTERED($Dom_picture; 90)
+ $Dom_picture:=SVG_New_embedded_image($svg; $Pic_buffer)
+
+ // SVG_ROTATION_CENTERED($Dom_picture; 90)
//________________________________________
: (True:C214)
$Txt_path:=System folder:C487(Desktop:K41:16)+"Elevation _1.tiff"
READ PICTURE FILE:C678($Txt_path; $Pic_buffer)
- SVG_New_embedded_image($Dom_svg; $Pic_buffer)
+ SVG_New_embedded_image($svg; $Pic_buffer)
//________________________________________
: (True:C214) // Embedded SVG
@@ -133,15 +148,14 @@ Case of
$Pic_buffer:=SVG_Export_to_picture($Dom_picture)
SVG_CLEAR($Dom_picture)
- $Dom_picture:=SVG_New_embedded_image($Dom_svg; $Pic_buffer) //; 100; 100; ".svg")
-
+ $Dom_picture:=SVG_New_embedded_image($svg; $Pic_buffer) // ; 100; 100; ".svg")
//________________________________________
: (True:C214)
$Txt_path:=System folder:C487(Desktop:K41:16)+"Elevation _1.tiff"
READ PICTURE FILE:C678($Txt_path; $Pic_buffer)
- SVG_New_embedded_image($Dom_svg; $Pic_buffer)
+ SVG_New_embedded_image($svg; $Pic_buffer)
//________________________________________
: (True:C214) // Define picture
@@ -151,64 +165,66 @@ Case of
$Pic_buffer:=SVG_Export_to_picture($Dom_root)
SVG_CLEAR($Dom_root)
- SVG_Define_image($Dom_svg; "myPicture"; $Pic_buffer; ".svg")
+ SVG_Define_image($svg; "myPicture"; $Pic_buffer; ".svg")
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 50; 50)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 50; 50)
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 80; 80)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 80; 80)
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 100; 100)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 100; 100)
//________________________________________
: (True:C214)
+
$Txt_path:=Select document:C905(""; ".svg"; ""; 0)
If (OK=1)
- $Dom_svg:=SVG_Open_file(DOCUMENT; True:C214)
+ $svg:=SVG_Open_file(DOCUMENT; True:C214)
End if
//________________________________________
- : (True:C214) //#ACI0097608
+
+ : (True:C214) // #ACI0097608
SVG_SET_OPTIONS(SVG_Get_options ?+ 1) // Enable the auto ID
- $Dom_g:=SVG_New_group($Dom_svg; "GroupID") // This group should have the id of "GroupID", but it gets an auto id
+ $g:=SVG_New_group($svg; "GroupID") // This group should have the id of "GroupID", but it gets an auto id
- $Dom_g:=SVG_New_group($Dom_svg)
- SVG_SET_ID($Dom_g; "NewGroupID") // this group correctly gets the id "NewGroupID"
+ $g:=SVG_New_group($svg)
+ SVG_SET_ID($g; "NewGroupID") // This group correctly gets the id "NewGroupID"
//________________________________________
: (True:C214)
$Lon_x:=200
$Lon_y:=100
- $Dom_circle:=SVG_New_ellipse($Dom_svg; $Lon_x; $Lon_y; 50; 80; "black"; "white"; 1)
- $Dom_circle:=SVG_New_ellipse($Dom_svg; $Lon_x; $Lon_y; 50; 80; "red"; "white"; 1)
+ $Dom_circle:=SVG_New_ellipse($svg; $Lon_x; $Lon_y; 50; 80; "black"; "white"; 1)
+ $Dom_circle:=SVG_New_ellipse($svg; $Lon_x; $Lon_y; 50; 80; "red"; "white"; 1)
SVG_ROTATION_CENTERED($Dom_circle; 45)
- $Dom_rect:=SVG_New_rect($Dom_svg; $Lon_x; $Lon_y; 3; 3; 0; 0; "black"; "red"; 0)
+ $Dom_rect:=SVG_New_rect($svg; $Lon_x; $Lon_y; 3; 3; 0; 0; "black"; "red"; 0)
- $Dom_circle:=SVG_New_circle($Dom_svg; 100; 100; 50)
+ $Dom_circle:=SVG_New_circle($svg; 100; 100; 50)
//________________________________________
: (True:C214)
- $Txt_buffer:="Application par circulation :\nConcentration bactéricide : 1.4%\nTempérature : "\
+ $t:="Application par circulation :\nConcentration bactéricide : 1.4%\nTempérature : "\
+"< 60°C\nTemps de contact : >5 minutes\nRinçage final à l'eau potable\nA utiliser "\
+"avec précaution sur métaux légers"
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_buffer)
+ $Dom_text:=SVG_New_textArea($svg; $t)
//________________________________________
: (True:C214) // SVG_SET_STROKE_VECTOR_EFFECT
- SVG_SET_DIMENSIONS($Dom_svg; 100; 100; "px")
- SVG_SET_VIEWBOX($Dom_svg; -1; -1; 1002; 1002; "none")
- SVG_SET_SHAPE_RENDERING($Dom_svg; "crispEdges")
+ SVG_SET_DIMENSIONS($svg; 100; 100; "px")
+ SVG_SET_VIEWBOX($svg; -1; -1; 1002; 1002; "none")
+ SVG_SET_SHAPE_RENDERING($svg; "crispEdges")
// Define pattern
- $Dom_pattern:=SVG_Define_pattern($Dom_svg; "p"; 250; 250; -1; -1; "userSpaceOnUse")
+ $Dom_pattern:=SVG_Define_pattern($svg; "p"; 250; 250; -1; -1; "userSpaceOnUse")
SVG_SET_PATTERN_CONTENT_UNITS($Dom_pattern; "userSpaceOnUse")
@@ -218,46 +234,46 @@ Case of
SVG_SET_STROKE_VECTOR_EFFECT($Dom_path; "non-scaling-stroke")
// Create rect
- $Dom_rect:=SVG_New_rect($Dom_svg; 0; 0; 1000; 1000; 0; 0; "black"; "url(#p)")
+ $Dom_rect:=SVG_New_rect($svg; 0; 0; 1000; 1000; 0; 0; "black"; "url(#p)")
SVG_SET_STROKE_VECTOR_EFFECT($Dom_rect; "non-scaling-stroke")
//________________________________________
- : (True:C214) //#ACI0096676
+ : (True:C214) // #ACI0096676
$Txt_source:="\nHi, please set some styles
for this "\
+"text\n
by selecting and right
clicking it."
- $Dom_text:=SVG_New_text($Dom_svg; $Txt_source; 0; 0)
+ $Dom_text:=SVG_New_text($svg; $Txt_source; 0; 0)
//________________________________________
: (True:C214)
- $Dom_text:=SVG_New_textArea($Dom_svg; "HELLO WORLD")
+ $Dom_text:=SVG_New_textArea($svg; "HELLO WORLD")
SVG_SET_FONT_FAMILY($Dom_text; "MS sans serif"; "sans-serif")
//________________________________________
: (True:C214)
- SVG_Set_title($Dom_svg; "test")
+ SVG_Set_title($svg; "test")
//________________________________________
: (True:C214)
- $Dom_rect:=SVG_New_rect($Dom_svg; 10; 10; 10; 10)
+ $Dom_rect:=SVG_New_rect($svg; 10; 10; 10; 10)
//________________________________________
- : (True:C214) //#ACI0098253 - Dominique
+ : (True:C214) // #ACI0098253 - Dominique
- $Dom_text:=SVG_New_textArea($Dom_svg; "S&P"; 10; 10)
+ $Dom_text:=SVG_New_textArea($svg; "S&P"; 10; 10)
- //SVG_SAVE_AS_TEXT ($Svg_root;System folder(Desktop)+"export.txt")
+ // SVG_SAVE_AS_TEXT ($Svg_root;System folder(Desktop)+"export.txt")
//________________________________________
: (True:C214)
$Txt_source:="Mon test à moi"
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_source; 10; 10; 790; 30)
- $Txt_buffer:=SVG_Get_text($Dom_text)
+ $Dom_text:=SVG_New_textArea($svg; $Txt_source; 10; 10; 790; 30)
+ $t:=SVG_Get_text($Dom_text)
//________________________________________
: (True:C214) // Relative path for css' files
@@ -267,83 +283,85 @@ Case of
// ----------------------------------------
: (False:C215) // Base is the folder "SVG" in the folder "Resources"
- SVG_Define_style($Dom_svg; "/monstyle.css")
+ SVG_Define_style($svg; "/monstyle.css")
// ----------------------------------------
: (True:C214) // Base is the folder "Resources"
- SVG_Define_style($Dom_svg; "./DEV/monstyle.css")
+ SVG_Define_style($svg; "./DEV/monstyle.css")
// ----------------------------------------
: (True:C214) // Base is the database's folder
- SVG_Define_style($Dom_svg; "../styles/monstyle.css")
+ SVG_Define_style($svg; "../styles/monstyle.css")
//----------------------------------------
End case
- $Dom_g:=SVG_New_group($Dom_SVG)
- SVG_SET_CLASS($Dom_g; "colored")
+ $g:=SVG_New_group($svg)
+
+ SVG_SET_CLASS($g; "colored")
// Draw a rectangle
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
//______________________________________________________
: (True:C214) // SVG_SET_HUE with style
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_360")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_360")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "360")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_300")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_300")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "300")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_240")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_240")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "240")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_180")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_180")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "180")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_120")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_120")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "120")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "hue_60")
+ $Dom_filter:=SVG_Define_filter($svg; "hue_60")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "60")
- SVG_Define_style($Dom_svg; "#pict_1{filter:url(#hue_360);}")
- SVG_Define_style($Dom_svg; "#pict_2{filter:url(#hue_300);}")
- SVG_Define_style($Dom_svg; "#pict_3{filter:url(#hue_240);}")
- SVG_Define_style($Dom_svg; "#pict_4{filter:url(#hue_180);}")
- SVG_Define_style($Dom_svg; "#pict_5{filter:url(#hue_120);}")
- SVG_Define_style($Dom_svg; "#pict_6{filter:url(#hue_60);}")
+ SVG_Define_style($svg; "#pict_1{filter:url(#hue_360);}")
+ SVG_Define_style($svg; "#pict_2{filter:url(#hue_300);}")
+ SVG_Define_style($svg; "#pict_3{filter:url(#hue_240);}")
+ SVG_Define_style($svg; "#pict_4{filter:url(#hue_180);}")
+ SVG_Define_style($svg; "#pict_5{filter:url(#hue_120);}")
+ SVG_Define_style($svg; "#pict_6{filter:url(#hue_60);}")
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "mona")
+ $Dom_symbol:=SVG_Define_symbol($svg; "mona")
SVG_New_image($Dom_symbol; "#dev/mona.jpg")
- For ($Lon_i; 0; 5; 1)
+ For ($i; 0; 5; 1)
- $Dom_node:=SVG_Use($Dom_svg; "mona")
+ $Dom_node:=SVG_Use($svg; "mona")
- SVG_SET_ID($Dom_node; "pict_"+String:C10($Lon_i+1))
- SVG_SET_TRANSFORM_TRANSLATE($Dom_node; 160*$Lon_i; 50*$Lon_i)
+ SVG_SET_ID($Dom_node; "pict_"+String:C10($i+1))
+ SVG_SET_TRANSFORM_TRANSLATE($Dom_node; 160*$i; 50*$i)
End for
//________________________________________
+
: (True:C214)
$Txt_path:=System folder:C487(Desktop:K41:16)+"Elevation _1.tiff"
READ PICTURE FILE:C678($Txt_path; $Pic_buffer)
- SVG_New_embedded_image($Dom_svg; $Pic_buffer)
+ SVG_New_embedded_image($svg; $Pic_buffer)
//________________________________________
: (True:C214)
- $Dom_g:=SVG_New_group($Dom_svg)
- DOM SET XML ATTRIBUTE:C866($Dom_g; \
+ $g:=SVG_New_group($svg)
+ DOM SET XML ATTRIBUTE:C866($g; \
"font-family"; "'helvetica'"; \
"font-size"; 24)
- $Dom_text:=SVG_New_text($Dom_g; "Aujourd'hui"; 10; 10; ""; 24)
- $Dom_text:=SVG_New_textArea($Dom_g; "Aujourd'hui"; 10; 40)
- SVG_SET_TEXTAREA_TEXT(SVG_New_textArea($Dom_g; ""; 10; 70); "Aujourd'hui")
- $Dom_text:=SVG_New_textArea($Dom_g; "Aujourd'hui"; 10; 100)
+ $Dom_text:=SVG_New_text($g; "Aujourd'hui"; 10; 10; ""; 24)
+ $Dom_text:=SVG_New_textArea($g; "Aujourd'hui"; 10; 40)
+ SVG_SET_TEXTAREA_TEXT(SVG_New_textArea($g; ""; 10; 70); "Aujourd'hui")
+ $Dom_text:=SVG_New_textArea($g; "Aujourd'hui"; 10; 100)
SVG_APPEND_TEXT_TO_TEXTAREA($Dom_text; "\rAujourd'hui")
- SVG EXPORT TO PICTURE:C1017($Dom_svg; $Pic_buffer)
+ SVG EXPORT TO PICTURE:C1017($svg; $Pic_buffer)
SET PICTURE TO PASTEBOARD:C521($Pic_buffer)
//________________________________________
@@ -351,18 +369,18 @@ Case of
$Txt_path:=System folder:C487(Desktop:K41:16)+"Elevation _1.tiff"
READ PICTURE FILE:C678($Txt_path; $Pic_buffer)
- SVG_New_embedded_image($Dom_svg; $Pic_buffer)
+ SVG_New_embedded_image($svg; $Pic_buffer)
- //SET BLOB SIZE($Blb_buffer;10*1024*1024;"azerty")
- //BASE64 ENCODE($Blb_buffer;$Txt_buffer)
+ // SET BLOB SIZE($Blb_buffer;10*1024*1024;"azerty")
+ // BASE64 ENCODE($Blb_buffer;$Txt_buffer)
//________________________________________
: (True:C214) // Define picture
$Txt_source:="<\r&\r'\r\"\r/\r>"
- //$Dom_text:=SVG_New_textArea ($Dom_svg;$Txt_sources;25;10;90;82;"Helvetica";80;0;Align center)
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_source; 25; 10; -1; -1; "Helvetica"; 80; 0; Align center:K42:3)
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;$Txt_sources;25;10;90;82;"Helvetica";80;0;Align center)
+ $Dom_text:=SVG_New_textArea($svg; $Txt_source; 25; 10; -1; -1; "Helvetica"; 80; 0; Align center:K42:3)
//________________________________________
: (True:C214) // Define picture
@@ -372,23 +390,23 @@ Case of
$Pic_buffer:=SVG_Export_to_picture($Dom_root)
SVG_CLEAR($Dom_root)
- SVG_Define_image($Dom_svg; "myPicture"; $Pic_buffer; ".svg")
+ SVG_Define_image($svg; "myPicture"; $Pic_buffer; ".svg")
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 50; 50)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 50; 50)
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 80; 80)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 80; 80)
- $Dom_use:=SVG_Use($Dom_svg; "myPicture"; 100; 100)
+ $Dom_use:=SVG_Use($svg; "myPicture"; 100; 100)
//________________________________________
: (True:C214) // Support for styled text in textArea
- $Txt_buffer:="Hello "+\
+ $t:="Hello "+\
"world"+\
" !"+\
"
it's me"
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_buffer; 50; 50)
+ $Dom_text:=SVG_New_textArea($svg; $t; 50; 50)
// Get plain text
$Txt_code:=SVG_Get_text($Dom_text)
@@ -399,47 +417,47 @@ Case of
//________________________________________
: (True:C214)
- SVG_New_line($Dom_svg; 150; 1; 150; 100; "red"; 0.5)
- SVG_New_text($Dom_svg; "Hello world"; 150; 10; "arial"; 24; 0; Align left:K42:2)
- SVG_New_text($Dom_svg; "Hello world"; 150; 60; "arial"; 24; 0; Align center:K42:3)
- SVG_New_text($Dom_svg; "Hello world"; 150; 30; "arial"; 24; 0; Align right:K42:4)
+ SVG_New_line($svg; 150; 1; 150; 100; "red"; 0.5)
+ SVG_New_text($svg; "Hello world"; 150; 10; "arial"; 24; 0; Align left:K42:2)
+ SVG_New_text($svg; "Hello world"; 150; 60; "arial"; 24; 0; Align center:K42:3)
+ SVG_New_text($svg; "Hello world"; 150; 30; "arial"; 24; 0; Align right:K42:4)
//________________________________________
- : (True:C214) //#ACI0093774
+ : (True:C214) // #ACI0093774
- $Txt_buffer:="Hello"
- ST SET ATTRIBUTES:C1093($Txt_buffer; ST Start text:K78:15; ST End text:K78:16; \
+ $t:="Hello"
+ ST SET ATTRIBUTES:C1093($t; ST Start text:K78:15; ST End text:K78:16; \
Attribute font name:K65:5; "arial")
- $Txt_buffer:="Hello "+\
+ $t:="Hello "+\
"World"+\
"!
"+\
"It's "+\
"Monday"
- $Dom_main:=SVG_New_group($Dom_svg)
+ $Dom_main:=SVG_New_group($svg)
// Limits
SVG_Post_comment($Dom_main; "grid")
- $Dom_g:=SVG_New_group($Dom_main)
+ $g:=SVG_New_group($Dom_main)
- For ($Lon_i; 0; 135; 5)
+ For ($i; 0; 135; 5)
- $Dom_line:=SVG_New_line($Dom_g; $Lon_i; 0; $Lon_i; 80; "blue"; 0.5)
+ $line:=SVG_New_line($g; $i; 0; $i; 80; "blue"; 0.5)
End for
- For ($Lon_i; 0; 80; 5)
+ For ($i; 0; 80; 5)
- $Dom_line:=SVG_New_line($Dom_g; 0; $Lon_i; 135; $Lon_i; "blue"; 0.5)
+ $line:=SVG_New_line($g; 0; $i; 135; $i; "blue"; 0.5)
End for
- SVG_SET_TRANSFORM_TRANSLATE($Dom_g; 0.5; 0.5)
+ SVG_SET_TRANSFORM_TRANSLATE($g; 0.5; 0.5)
// Text
SVG_Post_comment($Dom_main; "text")
- $Dom_text:=SVG_New_text($Dom_main; $Txt_buffer; 5; 1)
+ $Dom_text:=SVG_New_text($Dom_main; $t; 5; 1)
SVG_SET_FONT_FAMILY($Dom_text; "Arial")
SVG_SET_TRANSFORM_SCALE($Dom_main; 4)
@@ -448,7 +466,7 @@ Case of
$Txt_path:=System folder:C487(Desktop:K41:16)+"DEV"+Folder separator:K24:12
- DOM EXPORT TO VAR:C863($Dom_svg; $Txt_source)
+ DOM EXPORT TO VAR:C863($svg; $Txt_source)
$Txt_source:=Replace string:C233($Txt_source; " xmlns=\"\""; "")
$Dom_buffer:=DOM Parse XML variable:C720($Txt_source)
@@ -459,53 +477,54 @@ Case of
SVG EXPORT TO PICTURE:C1017($Dom_buffer; $Pic_buffer; Own XML data source:K45:18)
WRITE PICTURE FILE:C680($Txt_path+"WRITE PICTURE FILE.svg"; $Pic_buffer)
- SVG_SAVE_AS_PICTURE($Dom_svg; $Txt_path+"SVG_SAVE_AS_PICTURE.svg")
- SVG_SAVE_AS_TEXT($Dom_svg; $Txt_path+"SVG_SAVE_AS_TEXT.svg")
+ SVG_SAVE_AS_PICTURE($svg; $Txt_path+"SVG_SAVE_AS_PICTURE.svg")
+ SVG_SAVE_AS_TEXT($svg; $Txt_path+"SVG_SAVE_AS_TEXT.svg")
End if
//________________________________________
+
: (True:C214) // JFR
- $Txt_buffer:="12 rue de la republique\r13001 Marseille"
+ $t:="12 rue de la republique\r13001 Marseille"
$Lon_size:=18
$Txt_font:="helvetica"
$Txt_style:="{fill:red;font-family:'"+$Txt_font+"';font-size:"+String:C10($Lon_size)+"pt}"
- $Dom_text:=SVG_New_text($Dom_svg; $Txt_buffer; 400; 80; $Txt_font; $Lon_size; -1; Align right:K42:4; "blue")
- $Dom_text:=SVG_New_text($Dom_svg; $Txt_buffer; 400; 80; $Txt_style)
+ $Dom_text:=SVG_New_text($svg; $t; 400; 80; $Txt_font; $Lon_size; -1; Align right:K42:4; "blue")
+ $Dom_text:=SVG_New_text($svg; $t; 400; 80; $Txt_style)
//________________________________________
: (True:C214) // ACI00????? (FD)
- $Dom_rect:=SVG_New_rect($Dom_svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
+ $Dom_rect:=SVG_New_rect($svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
- $Txt_buffer:=System folder:C487(Desktop:K41:16)+"DEV"+Folder separator:K24:12+"test.svg"
- SVG_SAVE_AS_TEXT($Dom_svg; $Txt_buffer)
+ $t:=System folder:C487(Desktop:K41:16)+"DEV"+Folder separator:K24:12+"test.svg"
+ SVG_SAVE_AS_TEXT($svg; $t)
- $Boo_OK:=SVG_Validate_file($Txt_buffer)
+ $Boo_OK:=SVG_Validate_file($t)
//________________________________________
: (True:C214) // ACI00????? (FD)
// SVG_SET_DEFAULT_BRUSHES ("red";"blue")
- //$z:=SVG_New_path($z;10;10;
+ // $z:=SVG_New_path($z;10;10;
- $Dom_rect:=SVG_New_rect($Dom_svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
+ $Dom_rect:=SVG_New_rect($svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
SVG_SET_STROKE_MITERLIMIT($Dom_rect; 0)
//________________________________________
: (True:C214)
- $Dom_svg:=SVG_New
- $Dom_rect:=SVG_New_rect($Dom_svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
- $Txt_buffer:="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor."
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_buffer; 10; 10; 200; 310; "Georgia"; 25; Italic:K14:3; 5)
+ $svg:=SVG_New
+ $Dom_rect:=SVG_New_rect($svg; 5; 5; 210; 320; 0; 0; "#777"; "peachpuff"; 3)
+ $t:="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor."
+ $Dom_text:=SVG_New_textArea($svg; $t; 10; 10; 200; 310; "Georgia"; 25; Italic:K14:3; 5)
//________________________________________
: (True:C214)
- SVG_SET_SHAPE_RENDERING($Dom_svg; "crispEdges")
+ SVG_SET_SHAPE_RENDERING($svg; "crispEdges")
$Txt_inputData:="01234567"
@@ -520,49 +539,50 @@ Case of
$Lon_width:=$Lon_modules+($Lon_quiet*2) // +2
- SVG_SET_DIMENSIONS($Dom_svg; $Lon_width*$Lon_zoom; $Lon_width*$Lon_zoom)
- SVG_SET_VIEWBOX($Dom_svg; 0; 0; $Lon_width; $Lon_width)
+ SVG_SET_DIMENSIONS($svg; $Lon_width*$Lon_zoom; $Lon_width*$Lon_zoom)
+ SVG_SET_VIEWBOX($svg; 0; 0; $Lon_width; $Lon_width)
- SVG_New_rect($Dom_svg; 0; 0; $Lon_width-1; $Lon_width-1; -1; -1; "lightgray"; "white")
+ SVG_New_rect($svg; 0; 0; $Lon_width-1; $Lon_width-1; -1; -1; "lightgray"; "white")
// Grid
- $Dom_g:=SVG_New_group($Dom_svg; "dev-tools")
+ $g:=SVG_New_group($svg; "dev-tools")
- For ($Lon_i; 4; $Lon_width-4; 2)
+ For ($i; 4; $Lon_width-4; 2)
- SVG_New_line($Dom_g; 3.5; $Lon_i; $Lon_width-4.5; $Lon_i; "grey:10"; 1)
+ SVG_New_line($g; 3.5; $i; $Lon_width-4.5; $i; "grey:10"; 1)
End for
- For ($Lon_i; 4; $Lon_width-4; 2)
+ For ($i; 4; $Lon_width-4; 2)
- SVG_New_line($Dom_g; $Lon_i; 3.5; $Lon_i; $Lon_width-4.5; "grey:10"; 1)
+ SVG_New_line($g; $i; 3.5; $i; $Lon_width-4.5; "grey:10"; 1)
End for
// Detection pattern
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "detect"; 0; 0; 7; 7)
+
+ $Dom_symbol:=SVG_Define_symbol($svg; "detect"; 0; 0; 7; 7)
SVG_New_rect($Dom_symbol; -1; -1; 8; 8; -1; -1; "white"; "")
SVG_New_rect($Dom_symbol; 0; 0; 6; 6; -1; -1; "black"; "white")
SVG_New_rect($Dom_symbol; 2; 2; 2; 2; -1; -1; "black"; "black")
// Alignment pattern
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "align"; 0; 0; 5; 5)
+ $Dom_symbol:=SVG_Define_symbol($svg; "align"; 0; 0; 5; 5)
SVG_New_rect($Dom_symbol; 0; 0; 4; 4; -1; -1; "black"; "white")
SVG_New_rect($Dom_symbol; 1.5; 1.5; 1; 1; -1; -1; "black"; "black"; 0.25)
- SVG_New_line($Dom_svg; 11.5; 10; $Lon_width-11; 10; "white")
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_svg; 11.5; 10; $Lon_width-11; 10); 1)
+ SVG_New_line($svg; 11.5; 10; $Lon_width-11; 10; "white")
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($svg; 11.5; 10; $Lon_width-11; 10); 1)
- SVG_New_line($Dom_svg; 10; 11.5; 10; $Lon_width-11; "white")
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_svg; 10; 11.5; 10; $Lon_width-11); 1)
+ SVG_New_line($svg; 10; 11.5; 10; $Lon_width-11; "white")
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($svg; 10; 11.5; 10; $Lon_width-11); 1)
// Detection patterns
- SVG_Use($Dom_svg; "detect"; 4; 4)
+ SVG_Use($svg; "detect"; 4; 4)
- SVG_Use($Dom_svg; "detect"; $Lon_modules-3; 4)
+ SVG_Use($svg; "detect"; $Lon_modules-3; 4)
- SVG_Use($Dom_svg; "detect"; 4; $Lon_modules-3)
+ SVG_Use($svg; "detect"; 4; $Lon_modules-3)
$Lon_alignStart:=Int:C8($Lon_modules/2)+1
@@ -572,46 +592,45 @@ Case of
: ($Lon_modules>21)\
& ($Lon_modules<45)
- SVG_Use($Dom_svg; "align"; $Lon_modules-5; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_modules-5; $Lon_modules-5)
//______________________________________________________
: ($Lon_modules>44)\
& ($Lon_modules<101)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart+2; 8)
+ SVG_Use($svg; "align"; $Lon_alignStart+2; 8)
- SVG_Use($Dom_svg; "align"; 8; $Lon_alignStart+2)
+ SVG_Use($svg; "align"; 8; $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart+2; $Lon_alignStart+2)
+ SVG_Use($svg; "align"; $Lon_alignStart+2; $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; ($Lon_width-13); $Lon_alignStart+2)
+ SVG_Use($svg; "align"; ($Lon_width-13); $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; $Lon_modules-4; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_modules-4; $Lon_modules-5)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_alignStart; $Lon_modules-5)
//______________________________________________________
-
Else
//______________________________________________________
End case
- SVG_SET_TRANSFORM_TRANSLATE($Dom_svg; 0.5; 0.5)
+ SVG_SET_TRANSFORM_TRANSLATE($svg; 0.5; 0.5)
//________________________________________
: (False:C215)
- $Dom_picture:=SVG_New_embedded_image($Dom_svg; $Pic_buffer)
+ $Dom_picture:=SVG_New_embedded_image($svg; $Pic_buffer)
- $Dom_new:=DOM Create XML element:C865($Dom_svg; "test")
+ $Dom_new:=DOM Create XML element:C865($svg; "test")
- //DOM Append XML child node($Dom_new;XML DATA;"D;")
+ // DOM Append XML child node($Dom_new;XML DATA;"D;")
//________________________________________
- : (True:C214) //http://forums.4d.fr/Post//12706909/1/
+ : (True:C214) // Http://forums.4d.fr/Post//12706909/1/
- $Txt_buffer:=""\
+ $t:=""\
+"=======================\r"\
+"| ITEM | TOTAL |\r"\
+"=======================\r"\
@@ -623,175 +642,175 @@ Case of
+" ============\r"
// Default
- $Dom_text:=SVG_New_text($Dom_svg; "Default display"; 50; 35)
- SVG_SET_FONT_FAMILY(SVG_New_textArea($Dom_svg; $Txt_buffer; 50; 50); "Monaco"; "Lucida Console"; "monospace")
+ $Dom_text:=SVG_New_text($svg; "Default display"; 50; 35)
+ SVG_SET_FONT_FAMILY(SVG_New_textArea($svg; $t; 50; 50); "Monaco"; "Lucida Console"; "monospace")
- $Dom_text:=SVG_New_text($Dom_svg; "Option: Preserve spaces"; 50; 205)
+ $Dom_text:=SVG_New_text($svg; "Option: Preserve spaces"; 50; 205)
SVG_SET_OPTIONS(SVG_Get_options ?+ 13) // Preserve spaces in text objects
- SVG_SET_FONT_FAMILY(SVG_New_textArea($Dom_svg; $Txt_buffer; 50; 225); "Monaco"; "Lucida Console"; "monospace")
+ SVG_SET_FONT_FAMILY(SVG_New_textArea($svg; $t; 50; 225); "Monaco"; "Lucida Console"; "monospace")
- $Dom_text:=SVG_New_text($Dom_svg; "Option: Preserve spaces with SVG_SET_TEXTAREA_TEXT"; 50; 400)
+ $Dom_text:=SVG_New_text($svg; "Option: Preserve spaces with SVG_SET_TEXTAREA_TEXT"; 50; 400)
SVG_SET_OPTIONS(SVG_Get_options ?+ 13) // Preserve spaces in text objects
- $Dom_text:=SVG_New_textArea($Dom_svg; ""; 50; 420)
+ $Dom_text:=SVG_New_textArea($svg; ""; 50; 420)
SVG_SET_FONT_FAMILY($Dom_text; "Monaco"; "Lucida Console"; "monospace")
- $Txt_buffer:=" Hello "+\
+ $t:=" Hello "+\
"Paul"+\
"!"+\
"
Hello it's "+\
"vdl"
- SVG_SET_TEXTAREA_TEXT($Dom_text; $Txt_buffer)
+ SVG_SET_TEXTAREA_TEXT($Dom_text; $t)
//______________________________________________________
: (True:C214) // #18-3-2015
// Define default stroke and fill
- SVG_Define_style($Dom_svg; "*{stroke:blue;fill:none}")
+ SVG_Define_style($svg; "*{stroke:blue;fill:none}")
// Don't append default stroke and fill
SVG_SET_OPTIONS(SVG_Get_options ?+ 15)
- DOM SET XML ATTRIBUTE:C866($Dom_svg; \
+ DOM SET XML ATTRIBUTE:C866($svg; \
"width"; "100%"; \
"height"; "100%")
- SVG_SET_VIEWBOX($Dom_svg; -200; -150; 401; 301; "none")
- $Dom_rect:=SVG_New_rect($Dom_svg; -199; -149; 400; 300)
- $Dom_circle:=SVG_New_circle($Dom_svg; 0; 0; 10)
+ SVG_SET_VIEWBOX($svg; -200; -150; 401; 301; "none")
+ $Dom_rect:=SVG_New_rect($svg; -199; -149; 400; 300)
+ $Dom_circle:=SVG_New_circle($svg; 0; 0; 10)
//______________________________________________________
: (False:C215) // SVG_SET_HUE with style
- $Dom_filter:=SVG_Define_filter($Dom_svg; "Matrix")
+ $Dom_filter:=SVG_Define_filter($svg; "Matrix")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "matrix"; ".33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "Saturate")
+ $Dom_filter:=SVG_Define_filter($svg; "Saturate")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "saturate"; "150%")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "HueRotate90")
+ $Dom_filter:=SVG_Define_filter($svg; "HueRotate90")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "hueRotate"; "90")
- $Dom_filter:=SVG_Define_filter($Dom_svg; "LuminanceToAlpha")
+ $Dom_filter:=SVG_Define_filter($svg; "LuminanceToAlpha")
$Dom_node:=SVG_Filter_ColorMatrix($Dom_filter; "SourceGraphic"; ""; "luminanceToAlpha")
- $Dom_rect:=SVG_New_rect($Dom_svg; 2; 0; 797; 100; 0; 0; "none"; "coral")
+ $Dom_rect:=SVG_New_rect($svg; 2; 0; 797; 100; 0; 0; "none"; "coral")
- $Dom_rect:=SVG_New_rect($Dom_svg; 2; 100; 797; 100; 0; 0; "none"; "coral")
+ $Dom_rect:=SVG_New_rect($svg; 2; 100; 797; 100; 0; 0; "none"; "coral")
SVG_SET_FILTER($Dom_rect; "Matrix")
- $Dom_rect:=SVG_New_rect($Dom_svg; 2; 200; 797; 100; 0; 0; "none"; "coral")
+ $Dom_rect:=SVG_New_rect($svg; 2; 200; 797; 100; 0; 0; "none"; "coral")
SVG_SET_FILTER($Dom_rect; "Saturate")
- $Dom_rect:=SVG_New_rect($Dom_svg; 2; 300; 797; 100; 0; 0; "none"; "coral")
+ $Dom_rect:=SVG_New_rect($svg; 2; 300; 797; 100; 0; 0; "none"; "coral")
SVG_SET_FILTER($Dom_rect; "HueRotate90")
- $Dom_rect:=SVG_New_rect($Dom_svg; 2; 400; 797; 100; 0; 0; "none"; "coral")
+ $Dom_rect:=SVG_New_rect($svg; 2; 400; 797; 100; 0; 0; "none"; "coral")
SVG_SET_FILTER($Dom_rect; "LuminanceToAlpha")
- SVG_New_text($Dom_svg; "Pas de filtre"; 110; 10; "Verdana"; 60; Bold:K14:2; -1; "black")
- SVG_New_text($Dom_svg; "Matrix"; 110; 110; "Verdana"; 60; Bold:K14:2; -1; "black")
- SVG_New_text($Dom_svg; "Saturate"; 110; 210; "Verdana"; 60; Bold:K14:2; -1; "black")
- SVG_New_text($Dom_svg; "HueRotate"; 110; 310; "Verdana"; 60; Bold:K14:2; -1; "black")
- SVG_New_text($Dom_svg; "Luminance"; 110; 410; "Verdana"; 60; Bold:K14:2; -1; "black")
+ SVG_New_text($svg; "Pas de filtre"; 110; 10; "Verdana"; 60; Bold:K14:2; -1; "black")
+ SVG_New_text($svg; "Matrix"; 110; 110; "Verdana"; 60; Bold:K14:2; -1; "black")
+ SVG_New_text($svg; "Saturate"; 110; 210; "Verdana"; 60; Bold:K14:2; -1; "black")
+ SVG_New_text($svg; "HueRotate"; 110; 310; "Verdana"; 60; Bold:K14:2; -1; "black")
+ SVG_New_text($svg; "Luminance"; 110; 410; "Verdana"; 60; Bold:K14:2; -1; "black")
//________________________________________
: (True:C214)
- $Txt_buffer:="Hello "+\
+ $t:="Hello "+\
"Paul"+\
" !
"+\
"it's "+\
"vdl"
// Title
- SVG_SET_FONT_COLOR(SVG_New_text($Dom_svg; "_______ SVG_New_textArea ______"; 10; 30; ""; -1); "blue")
+ SVG_SET_FONT_COLOR(SVG_New_text($svg; "_______ SVG_New_textArea ______"; 10; 30; ""; -1); "blue")
// TextArea
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_buffer; 50; 50)
+ $Dom_text:=SVG_New_textArea($svg; $t; 50; 50)
// Title
- SVG_SET_FONT_COLOR(SVG_New_text($Dom_svg; "_______ svg_Newtext _______"; 10; 180); "blue")
+ SVG_SET_FONT_COLOR(SVG_New_text($svg; "_______ svg_Newtext _______"; 10; 180); "blue")
// Text
- $Dom_text:=SVG_New_text($Dom_svg; $Txt_buffer; 50; 200)
+ $Dom_text:=SVG_New_text($svg; $t; 50; 200)
//________________________________________
: (True:C214) // Relative path for pictures
// Base is the folder "SVG" in the folder "Resources"
- SVG_New_image($Dom_svg; "mona.jpg"; 0; 0)
+ SVG_New_image($svg; "mona.jpg"; 0; 0)
// Base is the folder "Resources"
- SVG_New_image($Dom_svg; "./DEV/apple.png"; 45; 5)
+ SVG_New_image($svg; "./DEV/apple.png"; 45; 5)
// Base is the database's folder
- SVG_New_image($Dom_svg; "../4d_40.png"; 140; 190)
+ SVG_New_image($svg; "../4d_40.png"; 140; 190)
// Base is the folder "SVG" in the folder "Resources"
- SVG_New_image($Dom_svg; "/sample pictures/php.gif"; 110; 95; 100; 100)
- SVG_SET_TRANSFORM_TRANSLATE(SVG_New_image($Dom_svg; "sample pictures/square.svg"; 110; 180; 200; 200); -25; 150)
+ SVG_New_image($svg; "/sample pictures/php.gif"; 110; 95; 100; 100)
+ SVG_SET_TRANSFORM_TRANSLATE(SVG_New_image($svg; "sample pictures/square.svg"; 110; 180; 200; 200); -25; 150)
//________________________________________
: (True:C214)
SVG_Set_error_handler("onErrCallMethod")
- $Dom_rect:=SVG_New_rect($Dom_g; 0; 0; 10; 0; 0; 0; "none"; "red")
+ $Dom_rect:=SVG_New_rect($g; 0; 0; 10; 0; 0; 0; "none"; "red")
//________________________________________
: (True:C214)
- //$Dom_rect:=SVG_New_rect ($Dom_svg;0;0;10;-1;0;0;"none";"red";0.5)
- //DOM SET XML ATTRIBUTE($Dom_rect;"height";"1em")
- //$Dom_text:=SVG_New_textArea ($Dom_svg;"1em";20;0)
- //DOM SET XML ATTRIBUTE($Dom_text;"font-size";"1em")
+ // $Dom_rect:=SVG_New_rect ($Dom_svg;0;0;10;-1;0;0;"none";"red";0.5)
+ // DOM SET XML ATTRIBUTE($Dom_rect;"height";"1em")
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;"1em";20;0)
+ // DOM SET XML ATTRIBUTE($Dom_text;"font-size";"1em")
- //$Dom_rect:=SVG_New_rect ($Dom_svg;0;20;10;-1;0;0;"none";"red";0.5)
- //DOM SET XML ATTRIBUTE($Dom_rect;"height";"2em")
- //$Dom_text:=SVG_New_textArea ($Dom_svg;"2em";20;20)
- //DOM SET XML ATTRIBUTE($Dom_text;"font-size";"2em")
+ // $Dom_rect:=SVG_New_rect ($Dom_svg;0;20;10;-1;0;0;"none";"red";0.5)
+ // DOM SET XML ATTRIBUTE($Dom_rect;"height";"2em")
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;"2em";20;20)
+ // DOM SET XML ATTRIBUTE($Dom_text;"font-size";"2em")
- //$Dom_rect:=SVG_New_rect ($Dom_svg;0;50;10;-1;0;0;"none";"red";0.5)
- //DOM SET XML ATTRIBUTE($Dom_rect;"height";"3em")
- //$Dom_text:=SVG_New_textArea ($Dom_svg;"3em";20;50)
- //DOM SET XML ATTRIBUTE($Dom_text;"font-size";"3em")
+ // $Dom_rect:=SVG_New_rect ($Dom_svg;0;50;10;-1;0;0;"none";"red";0.5)
+ // DOM SET XML ATTRIBUTE($Dom_rect;"height";"3em")
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;"3em";20;50)
+ // DOM SET XML ATTRIBUTE($Dom_text;"font-size";"3em")
- //SVG_Define_style ($Dom_svg;"textArea{font-size:3em}")
- //SVG_Define_style ($Dom_svg;"rect{height:3em}")
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "symbol")
+ // SVG_Define_style ($Dom_svg;"textArea{font-size:3em}")
+ // SVG_Define_style ($Dom_svg;"rect{height:3em}")
+ $Dom_symbol:=SVG_Define_symbol($svg; "symbol")
$Dom_text:=SVG_New_textArea($Dom_symbol; "Hello world"; 20)
- $Dom_g:=SVG_New_group($Dom_svg)
- SVG_Define_style($Dom_g; "{font-size:3em;height:3em}")
+ $g:=SVG_New_group($svg)
+ SVG_Define_style($g; "{font-size:3em;height:3em}")
- $Dom_rect:=SVG_New_rect($Dom_g; 0; 0; 10; 0; 0; 0; "none"; "red")
+ $Dom_rect:=SVG_New_rect($g; 0; 0; 10; 0; 0; 0; "none"; "red")
DOM REMOVE XML ATTRIBUTE:C1084($Dom_rect; "height")
DOM REMOVE XML ATTRIBUTE:C1084($Dom_rect; "rx")
DOM REMOVE XML ATTRIBUTE:C1084($Dom_rect; "ry")
- $Dom_text:=SVG_New_textArea($Dom_g; "3em"; 20)
+ $Dom_text:=SVG_New_textArea($g; "3em"; 20)
DOM REMOVE XML ATTRIBUTE:C1084($Dom_text; "height")
- //SVG_Define_style ($Dom_svg;".em3{height:3em;font-size:3em}")
- //SVG_SET_CLASS ($Dom_group;"em3")
+ // SVG_Define_style ($Dom_svg;".em3{height:3em;font-size:3em}")
+ // SVG_SET_CLASS ($Dom_group;"em3")
//________________________________________
: (True:C214)
// #26-8-2014
- // http://forums.4d.fr/Post/FR/15125439/1/15129432#15129432
+ // Http://forums.4d.fr/Post/FR/15125439/1/15129432#15129432
OB SET:C1220($Obj_buffer; \
"amp"; "&"; \
"gt"; "<"; \
"apos"; "'"; \
"quot"; "\"")
- $Txt_buffer:=JSON Stringify:C1217($Obj_buffer)
+ $t:=JSON Stringify:C1217($Obj_buffer)
- SVG_ADD_NAMESPACE($Dom_svg; "vdl"; "vdl@4d.fr")
- $Dom_rect:=SVG_New_rect($Dom_svg; 30; 30; 200; 60)
- SVG_SET_ATTRIBUTES($Dom_rect; "vdl:test"; $Txt_buffer)
+ SVG_ADD_NAMESPACE($svg; "vdl"; "vdl@4d.fr")
+ $Dom_rect:=SVG_New_rect($svg; 30; 30; 200; 60)
+ SVG_SET_ATTRIBUTES($Dom_rect; "vdl:test"; $t)
If (False:C215)
DOM GET XML ATTRIBUTE BY NAME:C728($Dom_rect; "vdl:test"; $Txt_inputData)
@@ -818,67 +837,67 @@ Case of
CLEAR VARIABLE:C89($Obj_buffer)
$Obj_buffer:=JSON Parse:C1218($Txt_inputData)
- SVG_SAVE_AS_TEXT($Dom_svg; System folder:C487(Desktop:K41:16)+"Untitled.svg")
+ SVG_SAVE_AS_TEXT($svg; System folder:C487(Desktop:K41:16)+"Untitled.svg")
//______________________________________________________
: (True:C214) // Quadrillage vertical
- SVG_Define_style($Dom_svg; ".grid {stroke-dasharray:1,10;}")
- SVG_SET_CLASS(SVG_New_line($Dom_svg; 20; 210; 829; 210; "Silver"; 400); "grid")
+ SVG_Define_style($svg; ".grid {stroke-dasharray:1,10;}")
+ SVG_SET_CLASS(SVG_New_line($svg; 20; 210; 829; 210; "Silver"; 400); "grid")
//______________________________________________________
: (False:C215)
- SVG_SET_DIMENSIONS($Dom_svg; 8; 4; "cm")
- SVG_SET_VIEWBOX($Dom_svg; 0; 0; 800; 400)
+ SVG_SET_DIMENSIONS($svg; 8; 4; "cm")
+ SVG_SET_VIEWBOX($svg; 0; 0; 800; 400)
- SVG_Set_description($Dom_svg; "Example lingrad01 - fill a rectangle using a linear gradient paint server")
+ SVG_Set_description($svg; "Example lingrad01 - fill a rectangle using a linear gradient paint server")
- SVG_Define_linear_gradient($Dom_svg; "MyGradient"; "#F60"; "#FF6"; 0; ""; 0.05; 0.95)
+ SVG_Define_linear_gradient($svg; "MyGradient"; "#F60"; "#FF6"; 0; ""; 0.05; 0.95)
- SVG_Post_comment($Dom_svg; "Outline the drawing area in blue")
- SVG_New_rect($Dom_svg; 1; 1; 798; 398; 0; 0; "blue"; "none")
+ SVG_Post_comment($svg; "Outline the drawing area in blue")
+ SVG_New_rect($svg; 1; 1; 798; 398; 0; 0; "blue"; "none")
- SVG_Post_comment($Dom_svg; "The rectangle is filled using the linear gradient")
- SVG_New_rect($Dom_svg; 100; 100; 600; 200; 0; 0; "black"; "url(#MyGradient)")
+ SVG_Post_comment($svg; "The rectangle is filled using the linear gradient")
+ SVG_New_rect($svg; 100; 100; 600; 200; 0; 0; "black"; "url(#MyGradient)")
//______________________________________________________
: (True:C214) // How do I make a button (2) v12
- SVG_SET_DIMENSIONS($Dom_svg; 1200; 800)
+ SVG_SET_DIMENSIONS($svg; 1200; 800)
// Define the gradient
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
- //$Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
+ // $Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
// Define a standard shadow
- SVG_Define_shadow($Dom_svg; "Shadow")
+ SVG_Define_shadow($svg; "Shadow")
// Define the title style
- $Txt_buffer:=".title{fill:black;font-family:'lucida grande',san-serif;font-size:20px;text-align:center;}"
- SVG_Define_style($Dom_svg; $Txt_buffer)
+ $t:=".title{fill:black;font-family:'lucida grande',san-serif;font-size:20px;text-align:center;}"
+ SVG_Define_style($svg; $t)
// Draw the button {
- $Dom_g:=SVG_New_group($Dom_svg; "MyButton")
+ $g:=SVG_New_group($svg; "MyButton")
// Put the color gradient
- SVG_SET_FILL_BRUSH($Dom_g; "url(#buttonGradient)")
- $Dom_rect:=SVG_New_rect($Dom_g; 30; 30; 200; 60; 10; 10; ""; "")
+ SVG_SET_FILL_BRUSH($g; "url(#buttonGradient)")
+ $Dom_rect:=SVG_New_rect($g; 30; 30; 200; 60; 10; 10; ""; "")
- //$Dom_text:=SVG_New_textArea ($Dom_g;"New Button…";30;45;200;60;"'Lucida Grande' Verdana";20;-1;Centré)
- $Dom_text:=SVG_New_textArea($Dom_g; "New Button…"; 30; 47; 200; 60)
+ // $Dom_text:=SVG_New_textArea ($Dom_g;"New Button…";30;45;200;60;"'Lucida Grande' Verdana";20;-1;Centré)
+ $Dom_text:=SVG_New_textArea($g; "New Button…"; 30; 47; 200; 60)
- //SVG_SET_FONT_COLOR ($Dom_text;"white")
+ // SVG_SET_FONT_COLOR ($Dom_text;"white")
- //SVG_SET_INLINE_STYLE ($Dom_text;$Txt_buffer)
- //DOM ECRIRE ATTRIBUT XML($Dom_text;"style";$Txt_buffer)
+ // SVG_SET_INLINE_STYLE ($Dom_text;$Txt_buffer)
+ // DOM ECRIRE ATTRIBUT XML($Dom_text;"style";$Txt_buffer)
SVG_SET_CLASS($Dom_text; "title")
// Put the shadow
SVG_SET_FILTER($Dom_rect; "Shadow")
- //}
+ // }
//________________________________________
: (True:C214) // Relative path for css' files
@@ -888,40 +907,41 @@ Case of
// ----------------------------------------
: (False:C215) // Base is the folder "SVG" in the folder "Resources"
- SVG_Define_style($Dom_svg; "/monstyle.css")
+ SVG_Define_style($svg; "/monstyle.css")
// ----------------------------------------
: (False:C215) // Base is the folder "Resources"
- SVG_Define_style($Dom_svg; "./DEV/monstyle.css")
+ SVG_Define_style($svg; "./DEV/monstyle.css")
// ----------------------------------------
: (True:C214) // Base is the database's folder
- SVG_Define_style($Dom_svg; "../styles/monstyle.css")
+ SVG_Define_style($svg; "../styles/monstyle.css")
//----------------------------------------
End case
- $Dom_g:=SVG_New_group($Dom_SVG)
- SVG_SET_CLASS($Dom_g; "colored")
+ $g:=SVG_New_group($svg)
+
+ SVG_SET_CLASS($g; "colored")
// Draw a rectangle
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
//________________________________________
: (True:C214)
$Txt_color:="black"
- $Dom_node:=SVG_Define_linear_gradient($Dom_svg; "gClicked"; ($Txt_color+":50"); ($Txt_color+":20"); -90; "reflect"; 0; 80)
+ $Dom_node:=SVG_Define_linear_gradient($svg; "gClicked"; ($Txt_color+":50"); ($Txt_color+":20"); -90; "reflect"; 0; 80)
- //$Dom_node:=SVG_Define_linear_gradient ($Dom_svg;"gClicked";($Txt_color+":50");($Txt_color+":20");-90;"reflect")
- //$tDom_stop{0}:=DOM Find XML element($Dom_node;"linearGradient/stop";$tDom_stop)
- //DOM SET XML ATTRIBUTE($tDom_stop{2};"offset";"90%")
+ // $Dom_node:=SVG_Define_linear_gradient ($Dom_svg;"gClicked";($Txt_color+":50");($Txt_color+":20");-90;"reflect")
+ // $tDom_stop{0}:=DOM Find XML element($Dom_node;"linearGradient/stop";$tDom_stop)
+ // DOM SET XML ATTRIBUTE($tDom_stop{2};"offset";"90%")
//________________________________________
: (False:C215)
- SVG_SET_SHAPE_RENDERING($Dom_svg; "crispEdges")
+ SVG_SET_SHAPE_RENDERING($svg; "crispEdges")
$Txt_inputData:="01234567"
@@ -936,49 +956,50 @@ Case of
$Lon_width:=$Lon_modules+($Lon_quiet*2) // +2
- SVG_SET_DIMENSIONS($Dom_svg; $Lon_width*$Lon_zoom; $Lon_width*$Lon_zoom)
- SVG_SET_VIEWBOX($Dom_svg; 0; 0; $Lon_width; $Lon_width)
+ SVG_SET_DIMENSIONS($svg; $Lon_width*$Lon_zoom; $Lon_width*$Lon_zoom)
+ SVG_SET_VIEWBOX($svg; 0; 0; $Lon_width; $Lon_width)
- SVG_New_rect($Dom_svg; 0; 0; $Lon_width-1; $Lon_width-1; -1; -1; "lightgray"; "white")
+ SVG_New_rect($svg; 0; 0; $Lon_width-1; $Lon_width-1; -1; -1; "lightgray"; "white")
// Grid
- $Dom_g:=SVG_New_group($Dom_svg; "dev-tools")
+ $g:=SVG_New_group($svg; "dev-tools")
- For ($Lon_i; 4; $Lon_width-4; 2)
+ For ($i; 4; $Lon_width-4; 2)
- SVG_New_line($Dom_g; 3.5; $Lon_i; $Lon_width-4.5; $Lon_i; "grey:10"; 1)
+ SVG_New_line($g; 3.5; $i; $Lon_width-4.5; $i; "grey:10"; 1)
End for
- For ($Lon_i; 4; $Lon_width-4; 2)
+ For ($i; 4; $Lon_width-4; 2)
- SVG_New_line($Dom_g; $Lon_i; 3.5; $Lon_i; $Lon_width-4.5; "grey:10"; 1)
+ SVG_New_line($g; $i; 3.5; $i; $Lon_width-4.5; "grey:10"; 1)
End for
// Detection pattern
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "detect"; 0; 0; 7; 7)
+
+ $Dom_symbol:=SVG_Define_symbol($svg; "detect"; 0; 0; 7; 7)
SVG_New_rect($Dom_symbol; -1; -1; 8; 8; -1; -1; "white"; "")
SVG_New_rect($Dom_symbol; 0; 0; 6; 6; -1; -1; "black"; "white")
SVG_New_rect($Dom_symbol; 2; 2; 2; 2; -1; -1; "black"; "black")
// Alignment pattern
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "align"; 0; 0; 5; 5)
+ $Dom_symbol:=SVG_Define_symbol($svg; "align"; 0; 0; 5; 5)
SVG_New_rect($Dom_symbol; 0; 0; 4; 4; -1; -1; "black"; "white")
SVG_New_rect($Dom_symbol; 1.5; 1.5; 1; 1; -1; -1; "black"; "black"; 0.25)
- SVG_New_line($Dom_svg; 11.5; 10; $Lon_width-11; 10; "white")
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_svg; 11.5; 10; $Lon_width-11; 10); 1)
+ SVG_New_line($svg; 11.5; 10; $Lon_width-11; 10; "white")
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($svg; 11.5; 10; $Lon_width-11; 10); 1)
- SVG_New_line($Dom_svg; 10; 11.5; 10; $Lon_width-11; "white")
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_svg; 10; 11.5; 10; $Lon_width-11); 1)
+ SVG_New_line($svg; 10; 11.5; 10; $Lon_width-11; "white")
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($svg; 10; 11.5; 10; $Lon_width-11); 1)
// Detection patterns
- SVG_Use($Dom_svg; "detect"; 4; 4)
+ SVG_Use($svg; "detect"; 4; 4)
- SVG_Use($Dom_svg; "detect"; $Lon_modules-3; 4)
+ SVG_Use($svg; "detect"; $Lon_modules-3; 4)
- SVG_Use($Dom_svg; "detect"; 4; $Lon_modules-3)
+ SVG_Use($svg; "detect"; 4; $Lon_modules-3)
$Lon_alignStart:=Int:C8($Lon_modules/2)+1
@@ -988,232 +1009,231 @@ Case of
: ($Lon_modules>21)\
& ($Lon_modules<45)
- SVG_Use($Dom_svg; "align"; $Lon_modules-5; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_modules-5; $Lon_modules-5)
//______________________________________________________
: ($Lon_modules>44)\
& ($Lon_modules<101)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart+2; 8)
+ SVG_Use($svg; "align"; $Lon_alignStart+2; 8)
- SVG_Use($Dom_svg; "align"; 8; $Lon_alignStart+2)
+ SVG_Use($svg; "align"; 8; $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart+2; $Lon_alignStart+2)
+ SVG_Use($svg; "align"; $Lon_alignStart+2; $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; ($Lon_width-13); $Lon_alignStart+2)
+ SVG_Use($svg; "align"; ($Lon_width-13); $Lon_alignStart+2)
- SVG_Use($Dom_svg; "align"; $Lon_modules-4; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_modules-4; $Lon_modules-5)
- SVG_Use($Dom_svg; "align"; $Lon_alignStart; $Lon_modules-5)
+ SVG_Use($svg; "align"; $Lon_alignStart; $Lon_modules-5)
//______________________________________________________
-
Else
//______________________________________________________
End case
- SVG_SET_TRANSFORM_TRANSLATE($Dom_svg; 0.5; 0.5)
+ SVG_SET_TRANSFORM_TRANSLATE($svg; 0.5; 0.5)
//________________________________________
: (False:C215) // Fade picture
- SVG_Define_radial_gradient($Dom_svg; "fade"; "black"; "white")
+ SVG_Define_radial_gradient($svg; "fade"; "black"; "white")
- SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10)
- SVG_New_rect($Dom_svg; 10; 10; 358; 529; 0; 0; "none"; "url(#fade)")
+ SVG_New_image($svg; "#dev/mona.jpg"; 10; 10)
+ SVG_New_rect($svg; 10; 10; 358; 529; 0; 0; "none"; "url(#fade)")
//________________________________________
: (True:C214) // Relative path for pictures
- SVG_New_image($Dom_svg; "./DEV/apple.png"; 20; 10) //base is the folder "Resources"
- SVG_New_image($Dom_svg; "../4d_40.png"; 70; 170) //base is the database's folder
- SVG_New_image($Dom_svg; "/sample pictures/php.gif"; 110; 95; 100; 100) //base is the folder "SVG" in the folder "Resources"
- SVG_SET_TRANSFORM_ROTATE(SVG_New_image($Dom_svg; "sample pictures/php.gif"; 110; 180; 100; 100); 180) //base is the folder "SVG" in the folder "Resources"
+ SVG_New_image($svg; "./DEV/apple.png"; 20; 10) // Base is the folder "Resources"
+ SVG_New_image($svg; "../4d_40.png"; 70; 170) // Base is the database's folder
+ SVG_New_image($svg; "/sample pictures/php.gif"; 110; 95; 100; 100) // Base is the folder "SVG" in the folder "Resources"
+ SVG_SET_TRANSFORM_ROTATE(SVG_New_image($svg; "sample pictures/php.gif"; 110; 180; 100; 100); 180) // Base is the folder "SVG" in the folder "Resources"
//________________________________________
: (False:C215)
- $Dom_line:=SVG_New_line($Dom_svg; 10; 10; 100; 10; "black"; 1)
- $Dom_line:=SVG_New_line($Dom_svg; 10; 20; 100; 20; "black"; 1)
- SVG_SET_SHAPE_RENDERING($Dom_line; "crispEdges")
+ $line:=SVG_New_line($svg; 10; 10; 100; 10; "black"; 1)
+ $line:=SVG_New_line($svg; 10; 20; 100; 20; "black"; 1)
+ SVG_SET_SHAPE_RENDERING($line; "crispEdges")
//________________________________________
: (True:C214)
- SVG_ADD_NAMESPACE($Dom_svg; "xlinkNS")
- SVG_Define_style($Dom_svg; "monstyle.css")
- $Dom_g:=SVG_New_group($Dom_SVG)
- SVG_SET_CLASS($Dom_g; "colored")
+ SVG_ADD_NAMESPACE($svg; "xlinkNS")
+ SVG_Define_style($svg; "monstyle.css")
+ $g:=SVG_New_group($svg)
+ SVG_SET_CLASS($g; "colored")
// Draw a rectangle
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
//________________________________________
: (True:C214)
- //SVG_New_image ($Dom_svg;"svg:mona.jpg";10;10)
- //SVG_New_image ($Dom_svg;"svg:level 1/level 2/mona.jpg";10;10)
- SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10)
+ // SVG_New_image ($Dom_svg;"svg:mona.jpg";10;10)
+ // SVG_New_image ($Dom_svg;"svg:level 1/level 2/mona.jpg";10;10)
+ SVG_New_image($svg; "#dev/mona.jpg"; 10; 10)
//________________________________________
- : (False:C215) //http://forums.4d.fr/Post/FR/12135209/1/12135210#12135210
+ : (False:C215) // Http://forums.4d.fr/Post/FR/12135209/1/12135210#12135210
- $Dom_text:=SVG_New_textArea($Dom_svg; "Hello\rworld!")
+ $Dom_text:=SVG_New_textArea($svg; "Hello\rworld!")
//______________________________________________________
: (False:C215) // SVG_SET_HUE
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10); 360)
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170; 60); 300)
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+160; 110); 240)
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+320; 160); 180)
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+480; 210); 120)
- SVG_SET_HUE(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+480+160; 260); 60)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_1")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;10;10)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_2")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170;60)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_3")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+160;110)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_4")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+320;160)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_5")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+480;210)
-
- //$Dom_node:=SVG_Use ($Dom_svg;"mona")
- //SVG_SET_ID ($Dom_node;"pict_6")
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+480+160;260)
-
- //SVG_SET_HUE (SVG_Use ($Dom_svg;"#dev/mona.jpg";10;10);360)
- //SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);300)
- //SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110);240)
- //SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);180)
- //SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);120)
- //SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480+160;260);60)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 10; 10); 360)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 170; 60); 300)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 170+160; 110); 240)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 170+320; 160); 180)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 170+480; 210); 120)
+ SVG_SET_HUE(SVG_New_image($svg; "#dev/mona.jpg"; 170+480+160; 260); 60)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_1")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;10;10)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_2")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170;60)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_3")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+160;110)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_4")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+320;160)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_5")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+480;210)
+
+ // $Dom_node:=SVG_Use ($Dom_svg;"mona")
+ // SVG_SET_ID ($Dom_node;"pict_6")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_node;170+480+160;260)
+
+ // SVG_SET_HUE (SVG_Use ($Dom_svg;"#dev/mona.jpg";10;10);360)
+ // SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);300)
+ // SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110);240)
+ // SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);180)
+ // SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);120)
+ // SVG_SET_HUE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480+160;260);60)
//________________________________________
: (False:C215)
- //css is in the folder"/Resources/dev/"
- //SVG_Define_style ($Dom_svg;"styles/monstyle.css")
+ // Css is in the folder"/Resources/dev/"
+ // SVG_Define_style ($Dom_svg;"styles/monstyle.css")
// Define 2 styles
- SVG_Define_style($Dom_SVG; ".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width:8; stroke-opacity: 0.6}")
- SVG_Define_style($Dom_svg; ".blue{fill: blue;}")
+ SVG_Define_style($svg; ".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width:8; stroke-opacity: 0.6}")
+ SVG_Define_style($svg; ".blue{fill: blue;}")
// Create a group and set a default style
- $Dom_g:=SVG_New_group($Dom_SVG)
- SVG_SET_CLASS($Dom_g; "colored blue")
+ $g:=SVG_New_group($svg)
+ SVG_SET_CLASS($g; "colored blue")
- $Txt_buffer:=SVG_Get_class($Dom_g; ->$tTxt_classes)
+ $t:=SVG_Get_class($g; ->$tTxt_classes)
- SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10)
+ SVG_New_image($svg; "#dev/mona.jpg"; 10; 10)
// Draw an object in the group
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
//________________________________________
: (False:C215)
- SVG_ADD_NAMESPACE($Dom_svg; "xlinkNS")
- $Dom_picture:=DOM Create XML element:C865($Dom_svg; "image"; \
+ SVG_ADD_NAMESPACE($svg; "xlinkNS")
+ $Dom_picture:=DOM Create XML element:C865($svg; "image"; \
"xlink:href"; "pictures/mona.jpg"; \
"x"; 10; \
"y"; 10; \
"width"; 358; \
"height"; 529)
- //SVG_New_image ($Dom_svg;"pictures/mona.jpg";10;10)
+ // SVG_New_image ($Dom_svg;"pictures/mona.jpg";10;10)
//________________________________________
: (False:C215) // Brightness
- SVG_SET_BRIGHTNESS(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10); 4)
- SVG_SET_BRIGHTNESS(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170; 60); 2)
- SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+160; 110)
- SVG_SET_BRIGHTNESS(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+320; 160); 0.5)
- SVG_SET_BRIGHTNESS(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+480; 210); 0.125)
+ SVG_SET_BRIGHTNESS(SVG_New_image($svg; "#dev/mona.jpg"; 10; 10); 4)
+ SVG_SET_BRIGHTNESS(SVG_New_image($svg; "#dev/mona.jpg"; 170; 60); 2)
+ SVG_New_image($svg; "#dev/mona.jpg"; 170+160; 110)
+ SVG_SET_BRIGHTNESS(SVG_New_image($svg; "#dev/mona.jpg"; 170+320; 160); 0.5)
+ SVG_SET_BRIGHTNESS(SVG_New_image($svg; "#dev/mona.jpg"; 170+480; 210); 0.125)
- //SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";10;10);2)
- //SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);1)
- //SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110)
- //SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);-0,2)
- //SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);-0,5)
+ // SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";10;10);2)
+ // SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);1)
+ // SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110)
+ // SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);-0,2)
+ // SVG_SET_BRIGHTNESS (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);-0,5)
//______________________________________________________
: (False:C215) // Quadrillage vertical
- SVG_Define_style($Dom_svg; ".grid {stroke-dasharray:1,10;}")
- SVG_SET_CLASS(SVG_New_line($Dom_svg; 20; 210; 829; 210; "Silver"; 400); "grid")
+ SVG_Define_style($svg; ".grid {stroke-dasharray:1,10;}")
+ SVG_SET_CLASS(SVG_New_line($svg; 20; 210; 829; 210; "Silver"; 400); "grid")
- //$Dom_line:=SVG_New_line ($Dom_svg;400;10;400;408;"Silver";806)
- //SVG_SET_STROKE_DASHARRAY ($Dom_line;1;10)
+ // $Dom_line:=SVG_New_line ($Dom_svg;400;10;400;408;"Silver";806)
+ // SVG_SET_STROKE_DASHARRAY ($Dom_line;1;10)
- //SVG_SET_TRANSFORM_TRANSLATE($Dom_svg;50)
+ // SVG_SET_TRANSFORM_TRANSLATE($Dom_svg;50)
//________________________________________
- : (False:C215) // inlining style
+ : (False:C215) // Inlining style
- $Dom_line:=SVG_New_line($Dom_svg; 10; 20; 100; 20)
- SVG_Define_style($Dom_line; "{stroke:blue;stroke-width:5px;}")
+ $line:=SVG_New_line($svg; 10; 20; 100; 20)
+ SVG_Define_style($line; "{stroke:blue;stroke-width:5px;}")
//________________________________________
: (False:C215)
- $Dom_line:=SVG_New_line($Dom_svg; 10; 10; 100; 10; "black"; 1)
+ $line:=SVG_New_line($svg; 10; 10; 100; 10; "black"; 1)
// 1ère solution
- $Dom_line:=SVG_New_line($Dom_svg; 10; 20; 100; 20; "black"; 1)
- SVG_SET_SHAPE_RENDERING($Dom_line; "crispEdges")
+ $line:=SVG_New_line($svg; 10; 20; 100; 20; "black"; 1)
+ SVG_SET_SHAPE_RENDERING($line; "crispEdges")
- //$Dom_line:=SVG_New_line ($Dom_svg;10;40;100;40;"black";1)
- //$Dom_line:=SVG_New_line ($Dom_svg;10;50,5;100;50,5;"black";1)
+ // $Dom_line:=SVG_New_line ($Dom_svg;10;40;100;40;"black";1)
+ // $Dom_line:=SVG_New_line ($Dom_svg;10;50,5;100;50,5;"black";1)
//________________________________________
: (False:C215)
- SVG_SET_VIEWPORT_FILL($Dom_svg; "white")
- SVG_SET_OPACITY($Dom_svg; 50)
- $Dom_rect:=SVG_New_rect($Dom_svg; 50; 50; 50; 50; 0; 0; "black"; "white")
+ SVG_SET_VIEWPORT_FILL($svg; "white")
+ SVG_SET_OPACITY($svg; 50)
+ $Dom_rect:=SVG_New_rect($svg; 50; 50; 50; 50; 0; 0; "black"; "white")
//________________________________________
: (False:C215)
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/mona.jpg"; 70; 40)
+ $Dom_picture:=SVG_New_image($svg; "#dev/mona.jpg"; 70; 40)
READ PICTURE FILE:C678(Get 4D folder:C485(Current resources folder:K5:16)+"dev:plugin.png"; $Pic_buffer)
- $Dom_picture:=SVG_New_embedded_image($Dom_svg; $Pic_buffer; 20; 0)
+ $Dom_picture:=SVG_New_embedded_image($svg; $Pic_buffer; 20; 0)
//________________________________________
: (False:C215)
- $Dom_rect:=SVG_New_rect($Dom_svg; 19; 0; 60; 40)
+ $Dom_rect:=SVG_New_rect($svg; 19; 0; 60; 40)
SVG_SET_STROKE_DASHARRAY($Dom_rect; 0)
//________________________________________
: (False:C215)
- // SVG_SET_OPTIONS (SVG_Get_options ?+ 11)
- //$Dom_circle:=SVG_New_circle ($Dom_svg;20;20;20)
- //$Dom_clip:=SVG_Define_clip_Path ($Dom_svg;"clipCircle")
- //SVG_New_rect ($Dom_clip;0;0;20;40)
- //SVG_SET_CLIP_PATH ($Dom_circle;"clipCircle")
+ // SVG_SET_OPTIONS (SVG_Get_options ?+ 11)
+ // $Dom_circle:=SVG_New_circle ($Dom_svg;20;20;20)
+ // $Dom_clip:=SVG_Define_clip_Path ($Dom_svg;"clipCircle")
+ // SVG_New_rect ($Dom_clip;0;0;20;40)
+ // SVG_SET_CLIP_PATH ($Dom_circle;"clipCircle")
- $Dom_rect:=SVG_New_rect($Dom_svg; 19; 0; 60; 40)
- SVG_New_arc($Dom_svg; 20; 20; 20; 180; 0)
+ $Dom_rect:=SVG_New_rect($svg; 19; 0; 60; 40)
+ SVG_New_arc($svg; 20; 20; 20; 180; 0)
//________________________________________
: (False:C215)
- $Dom_text:=SVG_New_textArea($Dom_svg; "Hello world !")
+ $Dom_text:=SVG_New_textArea($svg; "Hello world !")
ARRAY TEXT:C222($tTxt_attributeNames; 0x0000)
ARRAY TEXT:C222($tTxt_attributeValues; 0x0000)
@@ -1227,40 +1247,41 @@ Case of
APPEND TO ARRAY:C911($tTxt_attributeNames; "text-align")
APPEND TO ARRAY:C911($tTxt_attributeValues; "center")
- SVG_DEFINE_STYLE_WITH_ARRAYS($Dom_svg; ->$tTxt_attributeNames; ->$tTxt_attributeValues; "title")
+ SVG_DEFINE_STYLE_WITH_ARRAYS($svg; ->$tTxt_attributeNames; ->$tTxt_attributeValues; "title")
SVG_SET_CLASS($Dom_text; "title")
//________________________________________
: (False:C215)
- SVG_SET_VIEWPORT_FILL($Dom_svg; "red")
+ SVG_SET_VIEWPORT_FILL($svg; "red")
- For ($Lon_i; 0; 5000; 1)
+ For ($i; 0; 5000; 1)
- SVG_New_rect($Dom_svg; Random:C100; Random:C100; 100; 100)
+ SVG_New_rect($svg; Random:C100; Random:C100; 100; 100)
End for
//________________________________________
+
: (False:C215)
- SVG_ADD_NAMESPACE($Dom_svg; "vdl"; "vincent@de-lachaux.net")
+ SVG_ADD_NAMESPACE($svg; "vdl"; "vincent@de-lachaux.net")
- //SVG_ADD_NAME_SPACE ($Dom_svg;"xlinkNS")
+ // SVG_ADD_NAME_SPACE ($Dom_svg;"xlinkNS")
- $Dom_circle:=SVG_New_circle($Dom_svg; 100; 100; 50)
+ $Dom_circle:=SVG_New_circle($svg; 100; 100; 50)
DOM SET XML ATTRIBUTE:C866($Dom_circle; \
"vdl:myAttribut"; "toto")
//________________________________________
: (False:C215)
- // $Dom_text:=SVG_New_text ($Dom_svg;"Hello world !")
- //SVG_SET_FONT_STYLE ($Dom_text;8)
+ // $Dom_text:=SVG_New_text ($Dom_svg;"Hello world !")
+ // SVG_SET_FONT_STYLE ($Dom_text;8)
- $Dom_text:=SVG_New_textArea($Dom_svg; "Hello world !")
+ $Dom_text:=SVG_New_textArea($svg; "Hello world !")
- //$Txt_style:=".barre {text-decoration:underline;}"
+ // $Txt_style:=".barre {text-decoration:underline;}"
$Txt_style:=".barre {text-decoration:line-through;}"
SVG_Define_style($Dom_text; $Txt_style)
@@ -1271,16 +1292,16 @@ Case of
//SVG_ADD_NAME_SPACE ($Dom_svg;"vdl";"http://vdl.com/")
- SVG_SET_DIMENSIONS($Dom_svg; 1200; 800)
+ SVG_SET_DIMENSIONS($svg; 1200; 800)
// Define the gradient
- //$Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"cornflowerblue:50";"blue:50";90;"reflect";0;0,5;0;1)
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 50; 0; 100)
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "lavenderblush"; "red"; 90; "reflect"; 0; 0.1; 0; 100)
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "lavenderblush"; "red"; 90; "reflect"; 0; 10; 0; 100)
+ // $Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"cornflowerblue:50";"blue:50";90;"reflect";0;0,5;0;1)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 50; 0; 100)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "lavenderblush"; "red"; 90; "reflect"; 0; 0.1; 0; 100)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "lavenderblush"; "red"; 90; "reflect"; 0; 10; 0; 100)
// Define a standard shadow
- SVG_Define_shadow($Dom_svg; "Shadow")
+ SVG_Define_shadow($svg; "Shadow")
ARRAY TEXT:C222($tTxt_attributeNames; 0x0000)
ARRAY TEXT:C222($tTxt_attributeValues; 0x0000)
@@ -1294,267 +1315,266 @@ Case of
APPEND TO ARRAY:C911($tTxt_attributeNames; "text-align")
APPEND TO ARRAY:C911($tTxt_attributeValues; "center")
- SVG_DEFINE_STYLE_WITH_ARRAYS($Dom_svg; ->$tTxt_attributeNames; ->$tTxt_attributeValues; "title")
+ SVG_DEFINE_STYLE_WITH_ARRAYS($svg; ->$tTxt_attributeNames; ->$tTxt_attributeValues; "title")
// Draw the button {
- $Dom_g:=SVG_New_group($Dom_svg; "MyButton")
+ $g:=SVG_New_group($svg; "MyButton")
- $Dom_rect:=SVG_New_rect($Dom_g; 30; 30; 200; 60; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 30; 30; 200; 60; 10; 10; ""; "")
SVG_SET_FILL_BRUSH($Dom_rect; "url(#buttonGradient)")
- $Dom_text:=SVG_New_textArea($Dom_g; "New Button…"; 30; 45; 200; 60)
+ $Dom_text:=SVG_New_textArea($g; "New Button…"; 30; 45; 200; 60)
SVG_SET_CLASS($Dom_text; "title")
// Put the shadow
SVG_SET_FILTER($Dom_rect; "Shadow")
- //}
+ // }
//______________________________________________________
- : (False:C215) //http://forums.4d.fr/Post//6110068/1/
+ : (False:C215) // Http://forums.4d.fr/Post//6110068/1/
- //$nButtonLeft:=72
- //$nButtonTop:=17
- //$nButtonWidth:=55
- //$nButtonHeight:=22
+ // $nButtonLeft:=72
+ // $nButtonTop:=17
+ // $nButtonWidth:=55
+ // $nButtonHeight:=22
- //$nDiameter:=$nButtonHeight
- //$nRadius:=$nDiameter\2
+ // $nDiameter:=$nButtonHeight
+ // $nRadius:=$nDiameter\2
- //$nX:=$nRadius
- //$nY:=0
+ // $nX:=$nRadius
+ // $nY:=0
- //$nArcFlag:=0
- //$nSweepFlag:=0
+ // $nArcFlag:=0
+ // $nSweepFlag:=0
- //$Dom_symbol:=SVG_Define_symbol ($Dom_svg;"myButton")
- //$tPath:=SVG_New_path ($Dom_symbol;$nButtonLeft;$nButtonTop;$tStrokeColor;$tFillColor;$rStroke)
- //SVG_PATH_MOVE_TO ($tPath;$nRadius;$nDiameter)
- //SVG_PATH_ARC ($tPath;$nRadius;$nRadius;$nX;$nY;$nRotation;$nArcFlag+$nSweepFlag)
- //SVG_PATH_LINE_TO ($tPath;$nButtonWidth-$nRadius;0)
- //SVG_PATH_LINE_TO ($tPath;$nButtonWidth-$nRadius;$nDiameter)
- //SVG_PATH_CLOSE ($tPath)
- //$Dom_buffer:=SVG_Use ($Dom_svg;"myButton";$nButtonLeft;$nButtonTop)
+ // $Dom_symbol:=SVG_Define_symbol ($Dom_svg;"myButton")
+ // $tPath:=SVG_New_path ($Dom_symbol;$nButtonLeft;$nButtonTop;$tStrokeColor;$tFillColor;$rStroke)
+ // SVG_PATH_MOVE_TO ($tPath;$nRadius;$nDiameter)
+ // SVG_PATH_ARC ($tPath;$nRadius;$nRadius;$nX;$nY;$nRotation;$nArcFlag+$nSweepFlag)
+ // SVG_PATH_LINE_TO ($tPath;$nButtonWidth-$nRadius;0)
+ // SVG_PATH_LINE_TO ($tPath;$nButtonWidth-$nRadius;$nDiameter)
+ // SVG_PATH_CLOSE ($tPath)
+ // $Dom_buffer:=SVG_Use ($Dom_svg;"myButton";$nButtonLeft;$nButtonTop)
//______________________________________________________
: (False:C215) // ACI0072296
- $Dom_svg:=SVG_New
- $Dom_text:=SVG_New_textArea($Dom_svg; "2\r3\r4\r5")
+ $svg:=SVG_New
+ $Dom_text:=SVG_New_textArea($svg; "2\r3\r4\r5")
- $Dom_new:=SVG_Copy($Dom_svg)
- SVG_CLEAR($Dom_svg)
+ $Dom_new:=SVG_Copy($svg)
+ SVG_CLEAR($svg)
- $Dom_svg:=SVG_Copy($Dom_new)
+ $svg:=SVG_Copy($Dom_new)
SVG_CLEAR($Dom_new)
//______________________________________________________
: (False:C215) // Support for styled text in textArea
- $Txt_buffer:="Hello "+\
+ $t:="Hello "+\
"world"+\
" !"+\
"
it's me"
- $Dom_text:=SVG_New_textArea($Dom_svg; $Txt_buffer; 50; 50)
+ $Dom_text:=SVG_New_textArea($svg; $t; 50; 50)
//______________________________________________________
: (False:C215) // Embedded style for SVG_New_text & SVG_New_tspan (alternative syntax)
- $Dom_text:=SVG_New_text($Dom_svg; "Hello\rWorld !"; 10; 50; "{font-size:48px;fill:blue;font-weight:bold;}")
+ $Dom_text:=SVG_New_text($svg; "Hello\rWorld !"; 10; 50; "{font-size:48px;fill:blue;font-weight:bold;}")
SVG_New_tspan($Dom_text; "it's me"; 10; 108; "{fill:red;font-size:12px;}")
//______________________________________________________
: (False:C215) // Embedded style for SVG_New_textArea (alternative syntax)
- $Dom_text:=SVG_New_textArea($Dom_svg; "Hello World !"; 0; 0; -1; -1; "{font-size:48px;fill:red;font-weight:bold;}")
+ $Dom_text:=SVG_New_textArea($svg; "Hello World !"; 0; 0; -1; -1; "{font-size:48px;fill:red;font-weight:bold;}")
//______________________________________________________
: (False:C215) // Style definition & tspan included in a textArea
- $Txt_buffer:=SVG_Define_style($Dom_svg; "textArea {font-size:48px;}")
- $Txt_buffer:=SVG_Define_style($Dom_svg; ".colorRed {fill:red;}")
- $Dom_text:=SVG_New_textArea($Dom_svg; "Hello \r")
+ $t:=SVG_Define_style($svg; "textArea {font-size:48px;}")
+ $t:=SVG_Define_style($svg; ".colorRed {fill:red;}")
+ $Dom_text:=SVG_New_textArea($svg; "Hello \r")
SVG_SET_CLASS(SVG_New_tspan($Dom_text; "World "; -1; -1; ""; -1); "colorRed")
SVG_APPEND_TEXT_TO_TEXTAREA($Dom_text; "!")
//______________________________________________________
: (False:C215) // SVG_Get_root_reference
- $Dom_g:=SVG_New_group($Dom_svg)
- SVG_Post_comment($Dom_svg; $Dom_svg)
- SVG_New_text($Dom_svg; SVG_Get_root_reference($Dom_g))
-
+ $g:=SVG_New_group($svg)
+ SVG_Post_comment($svg; $svg)
+ SVG_New_text($svg; SVG_Get_root_reference($g))
//______________________________________________________
: (False:C215)
- //
//
- //
- //$Dom_filter:=SVG_Define_filter ($Dom_svg;"greyscale";0;0;100;100;"objectBoundingBox")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".15 .15 .15 0 0 .15 .15 .15 0 0 .15 .15 .15 0 0 .15 .15 .15 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".05 .05 .05 0 0 .05 .05 .05 0 0 .05 .05 .05 0 0 .05 .05 .05 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".66 .66 .66 0 0 .66 .66 .66 0 0 .66 .66 .66 0 0 .66 .66 .66 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".100 .100 .100 0 0 .100 .100 .100 0 0 .100 .100 .100 0 0 .100 .100 .100 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".255 .255 .255 0 0 .255 .255 .255 0 0 .255 .255 .255 0 0 .255 .255 .255 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".999 .999 .999 0 0 .999 .999 .999 0 0 .999 .999 .999 0 0 .999 .999 .999 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0")
- //$Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 0 0")
-
- //$Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";10;10)
-
- // //$Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";10;10)
- //$Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";100;100)
- // //SVG_SET_FILTER ($Dom_picture;"greyscale")
- // SVG_FADE_TO_GREY_SCALE($Dom_picture;10)
-
- $Dom_symbol:=SVG_Define_symbol($Dom_svg; "picture")
+ //
+ // $Dom_filter:=SVG_Define_filter ($Dom_svg;"greyscale";0;0;100;100;"objectBoundingBox")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".15 .15 .15 0 0 .15 .15 .15 0 0 .15 .15 .15 0 0 .15 .15 .15 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".05 .05 .05 0 0 .05 .05 .05 0 0 .05 .05 .05 0 0 .05 .05 .05 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".66 .66 .66 0 0 .66 .66 .66 0 0 .66 .66 .66 0 0 .66 .66 .66 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".100 .100 .100 0 0 .100 .100 .100 0 0 .100 .100 .100 0 0 .100 .100 .100 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".255 .255 .255 0 0 .255 .255 .255 0 0 .255 .255 .255 0 0 .255 .255 .255 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";".999 .999 .999 0 0 .999 .999 .999 0 0 .999 .999 .999 0 0 .999 .999 .999 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"255 255 255 0 0 255 255 255 0 0 255 255 255 0 0 255 255 255 0 0")
+ // $Dom_fe:=SVG_Filter_ColorMatrix ($Dom_filter;"SourceGraphic";"";"matrix";"-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 0 0")
+
+ // $Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";10;10)
+
+ // //$Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";10;10)
+ // $Dom_picture:=SVG_New_image ($Dom_svg;"#dev/php.gif";100;100)
+ // //SVG_SET_FILTER ($Dom_picture;"greyscale")
+ // SVG_FADE_TO_GREY_SCALE($Dom_picture;10)
+
+ $Dom_symbol:=SVG_Define_symbol($svg; "picture")
SVG_New_image($Dom_symbol; "#dev/pl3436.jpg")
- //SVG_Use ($Dom_svg;"picture")
- $Dom_g:=SVG_New_group($Dom_svg)
+ // SVG_Use ($Dom_svg;"picture")
+ $g:=SVG_New_group($svg)
- SVG_Use($Dom_g; "picture")
+ SVG_Use($g; "picture")
- SVG_SET_SATURATION($Dom_g; 0)
+ SVG_SET_SATURATION($g; 0)
- //SVG_FADE_TO_GREY_SCALE ($Dom_g;0,8)
+ // SVG_FADE_TO_GREY_SCALE ($Dom_g;0,8)
- //SVG_New_image ($Dom_svg;"#dev/pl3436.jpg";10;10)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/pl3436.jpg";170;60);33)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);33)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110);66)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);132)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);264)
- //SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480+160;260);264+264)
+ // SVG_New_image ($Dom_svg;"#dev/pl3436.jpg";10;10)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/pl3436.jpg";170;60);33)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170;60);33)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+160;110);66)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+320;160);132)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480;210);264)
+ // SVG_FADE_TO_GREY_SCALE (SVG_New_image ($Dom_svg;"#dev/mona.jpg";170+480+160;260);264+264)
//______________________________________________________
: (False:C215) // Colors
- $Dom_circle:=SVG_New_circle($Dom_svg; 200; 100; 80; "none"; "red:60")
- $Dom_circle:=SVG_New_circle($Dom_svg; 250; 175; 80; "none"; "blue:60")
- $Dom_circle:=SVG_New_circle($Dom_svg; 150; 175; 80; "none"; "yellow:60")
+ $Dom_circle:=SVG_New_circle($svg; 200; 100; 80; "none"; "red:60")
+ $Dom_circle:=SVG_New_circle($svg; 250; 175; 80; "none"; "blue:60")
+ $Dom_circle:=SVG_New_circle($svg; 150; 175; 80; "none"; "yellow:60")
- SVG_SAVE_AS_TEXT($Dom_svg; System folder:C487(Desktop:K41:16)+"test.svg")
+ SVG_SAVE_AS_TEXT($svg; System folder:C487(Desktop:K41:16)+"test.svg")
//______________________________________________________
: (False:C215) // SVG_SET_SATURATION
- SVG_SET_SATURATION(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 10; 10); 100)
- SVG_SET_SATURATION(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170; 60); 50)
- SVG_SET_SATURATION(SVG_New_image($Dom_svg; "#dev/mona.jpg"; 170+160; 110); 0)
+ SVG_SET_SATURATION(SVG_New_image($svg; "#dev/mona.jpg"; 10; 10); 100)
+ SVG_SET_SATURATION(SVG_New_image($svg; "#dev/mona.jpg"; 170; 60); 50)
+ SVG_SET_SATURATION(SVG_New_image($svg; "#dev/mona.jpg"; 170+160; 110); 0)
//______________________________________________________
: (False:C215) // How do I make a button (2) v12
- SVG_SET_DIMENSIONS($Dom_svg; 1200; 800)
+ SVG_SET_DIMENSIONS($svg; 1200; 800)
// Define the gradient
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
- //$Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
+ // $Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
// Define a standard shadow
- SVG_Define_shadow($Dom_svg; "Shadow")
+ SVG_Define_shadow($svg; "Shadow")
// Define the title style
- $Txt_buffer:=".title{fill:black;font-family:'Lucida Grande' Verdana;font-size:20px;text-align:center;}"
- SVG_Define_style($Dom_svg; $Txt_buffer)
+ $t:=".title{fill:black;font-family:'Lucida Grande' Verdana;font-size:20px;text-align:center;}"
+ SVG_Define_style($svg; $t)
// Draw the button {
- $Dom_g:=SVG_New_group($Dom_svg; "MyButton")
+ $g:=SVG_New_group($svg; "MyButton")
// Put the color gradient
- SVG_SET_FILL_BRUSH($Dom_g; "url(#buttonGradient)")
- $Dom_rect:=SVG_New_rect($Dom_g; 30; 30; 200; 60; 10; 10; ""; "")
+ SVG_SET_FILL_BRUSH($g; "url(#buttonGradient)")
+ $Dom_rect:=SVG_New_rect($g; 30; 30; 200; 60; 10; 10; ""; "")
- //$Dom_text:=SVG_New_textArea ($Dom_g;"New Button…";30;45;200;60;"'Lucida Grande' Verdana";20;-1;Centré)
- $Dom_text:=SVG_New_textArea($Dom_g; "New Button…"; 30; 45; 200; 60)
+ // $Dom_text:=SVG_New_textArea ($Dom_g;"New Button…";30;45;200;60;"'Lucida Grande' Verdana";20;-1;Centré)
+ $Dom_text:=SVG_New_textArea($g; "New Button…"; 30; 45; 200; 60)
- //SVG_SET_FONT_COLOR ($Dom_text;"white")
+ // SVG_SET_FONT_COLOR ($Dom_text;"white")
- //SVG_SET_INLINE_STYLE ($Dom_text;$Txt_buffer)
- //DOM ECRIRE ATTRIBUT XML($Dom_text;"style";$Txt_buffer)
+ // SVG_SET_INLINE_STYLE ($Dom_text;$Txt_buffer)
+ // DOM ECRIRE ATTRIBUT XML($Dom_text;"style";$Txt_buffer)
SVG_SET_CLASS($Dom_text; "title")
// Put the shadow
SVG_SET_FILTER($Dom_rect; "Shadow")
- //}
+ // }
//______________________________________________________
: (False:C215) // How do I make a button (1) v11
- SVG_SET_DIMENSIONS($Dom_svg; 1200; 800)
+ SVG_SET_DIMENSIONS($svg; 1200; 800)
// Define the gradient
- $Dom_gradient:=SVG_Define_linear_gradient($Dom_svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
+ $Dom_gradient:=SVG_Define_linear_gradient($svg; "buttonGradient"; "cornflowerblue:50"; "blue:50"; 90; "reflect"; 0; 0.5; 0; 1)
- //$Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
+ // $Dom_gradient:=SVG_Define_linear_gradient ($Dom_svg;"buttonGradient";"lavenderblush";"red";90;"reflect";0;0,1;0;1)
// Define a standard shadow
- SVG_Define_shadow($Dom_svg; "Shadow")
+ SVG_Define_shadow($svg; "Shadow")
// Draw the button {
- $Dom_g:=SVG_New_group($Dom_svg; "MyButton")
+ $g:=SVG_New_group($svg; "MyButton")
// Put the color gradient
- SVG_SET_FILL_BRUSH($Dom_g; "url(#buttonBlue)")
- $Dom_rect:=SVG_New_rect($Dom_g; 30; 30; 200; 60; 20; 20; ""; "")
- $Dom_text:=SVG_New_textArea($Dom_g; "New Button…"; 30; 45; 200; 60; "'Lucida Grande' Verdana"; 20; -1; Align center:K42:3)
+ SVG_SET_FILL_BRUSH($g; "url(#buttonBlue)")
+ $Dom_rect:=SVG_New_rect($g; 30; 30; 200; 60; 20; 20; ""; "")
+ $Dom_text:=SVG_New_textArea($g; "New Button…"; 30; 45; 200; 60; "'Lucida Grande' Verdana"; 20; -1; Align center:K42:3)
SVG_SET_FONT_COLOR($Dom_text; "white")
// Put the shadow
SVG_SET_FILTER($Dom_rect; "Shadow")
- //}
+ // }
//______________________________________________________
: (False:C215) // Filligrane
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/mona.jpg"; 70; 40)
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/plugin.png"; 20; 0)
+ $Dom_picture:=SVG_New_image($svg; "#dev/mona.jpg"; 70; 40)
+ $Dom_picture:=SVG_New_image($svg; "#dev/plugin.png"; 20; 0)
SVG_SET_OPACITY($Dom_picture; 40)
//________________________________________
: (False:C215)
- $Dom_text:=SVG_New_text($Dom_svg; "Lucida Grande"; 10; 20; "'Lucida Grande'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Lucida Blackletter"; 10; 60; "'Lucida Blackletter'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Missing Font"; 10; 100; "'Missing Font'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Missing Font, Lucida Blackletter"; 10; 140; "'Missing Font' 'Lucida Blackletter'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Lucida Grande"; 10; 20; "'Lucida Grande'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Lucida Blackletter"; 10; 60; "'Lucida Blackletter'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Missing Font"; 10; 100; "'Missing Font'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Missing Font, Lucida Blackletter"; 10; 140; "'Missing Font' 'Lucida Blackletter'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Helvetica"; 10; 200; "'Helvetica'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Helvetica Neue"; 10; 240; "'Helvetica Neue'"; 24)
- $Dom_text:=SVG_New_text($Dom_svg; "Helvetica Neue Black Condensed"; 10; 280; "'Helvetica Neue Black Condensed'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Helvetica"; 10; 200; "'Helvetica'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Helvetica Neue"; 10; 240; "'Helvetica Neue'"; 24)
+ $Dom_text:=SVG_New_text($svg; "Helvetica Neue Black Condensed"; 10; 280; "'Helvetica Neue Black Condensed'"; 24)
//______________________________________________________
: (False:C215) // Filligrane
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/mona.jpg"; 70; 40)
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/plugin.png"; 20; 0)
+ $Dom_picture:=SVG_New_image($svg; "#dev/mona.jpg"; 70; 40)
+ $Dom_picture:=SVG_New_image($svg; "#dev/plugin.png"; 20; 0)
SVG_SET_OPACITY($Dom_picture; 40)
- //SVG_SAVE_AS_PICTURE ($Dom_svg;"";".png")
+ // SVG_SAVE_AS_PICTURE ($Dom_svg;"";".png")
//______________________________________________________
: (False:C215) // Transparence
- $Dom_rect:=SVG_New_rect($Dom_svg; 0; 0; 192; 341; 0; 0; "black"; "black")
- $Dom_picture:=SVG_New_image($Dom_svg; "#dev/Sv hund.gif")
+ $Dom_rect:=SVG_New_rect($svg; 0; 0; 192; 341; 0; 0; "black"; "black")
+ $Dom_picture:=SVG_New_image($svg; "#dev/Sv hund.gif")
//______________________________________________________
: (False:C215)
- $Dom_svg:=DOM Create XML Ref:C861("svg"; "http://www.w3.org/2000/svg")
- $Dom_rect:=DOM Create XML element:C865($Dom_svg; "rect"; \
+ $svg:=DOM Create XML Ref:C861("svg"; "http://www.w3.org/2000/svg")
+ $Dom_rect:=DOM Create XML element:C865($svg; "rect"; \
"x"; 10; \
"y"; 10; \
"width"; 200; \
@@ -1564,51 +1584,51 @@ Case of
"fill"; "white"; \
"stroke"; "black")
- SVG EXPORT TO PICTURE:C1017($Dom_SVG; $Pic_buffer)
+ SVG EXPORT TO PICTURE:C1017($svg; $Pic_buffer)
WRITE PICTURE FILE:C680(System folder:C487(Desktop:K41:16)+"test.svg"; $Pic_buffer; ".svg")
WRITE PICTURE FILE:C680(System folder:C487(Desktop:K41:16)+"test.png"; $Pic_buffer; ".png")
- DOM CLOSE XML:C722($Dom_svg)
+ DOM CLOSE XML:C722($svg)
//______________________________________________________
: (False:C215)
- //SVG_Define_shadow ($Dom_svg;"Shadow")
+ // SVG_Define_shadow ($Dom_svg;"Shadow")
- //$Txt_buffer:=".selected{filter: #Shadow}"
- //SVG_Define_style ($Dom_svg;$Txt_buffer)
+ // $Txt_buffer:=".selected{filter: #Shadow}"
+ // SVG_Define_style ($Dom_svg;$Txt_buffer)
- //$Txt_buffer:=".not_selected{filter: none}"
- //SVG_Define_style ($Dom_svg;$Txt_buffer)
+ // $Txt_buffer:=".not_selected{filter: none}"
+ // SVG_Define_style ($Dom_svg;$Txt_buffer)
- $Dom_rect:=SVG_New_rect($Dom_svg; 10; 10; 200; 100; 20; 20)
+ $Dom_rect:=SVG_New_rect($svg; 10; 10; 200; 100; 20; 20)
- //SVG_SET_ID ($Dom_rect;"toto")
- //SVG_SET_FILTER ($Dom_rect;"none")
+ // SVG_SET_ID ($Dom_rect;"toto")
+ // SVG_SET_FILTER ($Dom_rect;"none")
- //DOM ECRIRE ATTRIBUT XML($rect;"filter";"none")
- //SVG_SET_CLASS ($rect;"not_selected")
+ // DOM ECRIRE ATTRIBUT XML($rect;"filter";"none")
+ // SVG_SET_CLASS ($rect;"not_selected")
- // SVGTool_SET_VIEWER_CALLBACK ("testCallbackMethod")
+ // SVGTool_SET_VIEWER_CALLBACK(Formula(testCallbackMethod).source)
//______________________________________________________
: (False:C215)
- $Dom_text:=SVG_New_text($Dom_svg; "tagada")
+ $Dom_text:=SVG_New_text($svg; "tagada")
SVG_SET_FONT_STYLE($Dom_text; Bold:K14:2)
//______________________________________________________
: (False:C215)
- //LIRE FICHIER IMAGE(Dossier 4D(Dossier Resources courant)+"Images:icon.svg";$Pic_buffer)
- //$Dom_picture:=SVG_New_embedded_image ($Dom_svg;$Pic_buffer;0;0;".svg")
- //SVG_SET_OPACITY ($Dom_picture;50)
+ // LIRE FICHIER IMAGE(Dossier 4D(Dossier Resources courant)+"Images:icon.svg";$Pic_buffer)
+ // $Dom_picture:=SVG_New_embedded_image ($Dom_svg;$Pic_buffer;0;0;".svg")
+ // SVG_SET_OPACITY ($Dom_picture;50)
- $Dom_g:=SVG_New_group($Dom_svg)
- $Dom_circle:=SVG_New_circle($Dom_g; 100; 100; 25; "blue"; "blue"; 5)
+ $g:=SVG_New_group($svg)
+ $Dom_circle:=SVG_New_circle($g; 100; 100; 25; "blue"; "blue"; 5)
SVG_SET_OPACITY($Dom_circle; 50; 80)
- SVG_SET_OPACITY($Dom_g; 80)
+ SVG_SET_OPACITY($g; 80)
//______________________________________________________
: (False:C215)
@@ -1624,119 +1644,119 @@ Case of
$tTxt_names{8}:="hdl-bottom-right"
$tTxt_names{9}:="select-rect"
- $Dom_g:=SVG_New_group($Dom_svg)
+ $g:=SVG_New_group($svg)
- For ($Lon_i; 1; 8; 1)
+ For ($i; 1; 8; 1)
- SVG_SET_ID(SVG_New_circle($Dom_g; 0; 0; 5; "bkue:50"; "blue"; 1); $tTxt_names{$Lon_i})
+ SVG_SET_ID(SVG_New_circle($g; 0; 0; 5; "bkue:50"; "blue"; 1); $tTxt_names{$i})
End for
- SVG_SET_ID(SVG_New_rect($Dom_g; 0; 0; 0; 0; 0; 0; "blue:50"; "none"; 1); $tTxt_names{9})
+ SVG_SET_ID(SVG_New_rect($g; 0; 0; 0; 0; 0; 0; "blue:50"; "none"; 1); $tTxt_names{9})
- SVG_SET_VISIBILITY(SVG_Find_ID($Dom_svg; "tools"); True:C214)
+ SVG_SET_VISIBILITY(SVG_Find_ID($svg; "tools"); True:C214)
//______________________________________________________
: (False:C215)
- $Dom_text:=SVG_New_text($Dom_svg; "Salut tout le monde"; 20; 20)
+ $Dom_text:=SVG_New_text($svg; "Salut tout le monde"; 20; 20)
SVG_SET_TEXT_RENDERING($Dom_text; "optimizeLegibility")
- $Dom_text:=SVG_New_text($Dom_svg; "Salut tout le monde"; 20; 60)
+ $Dom_text:=SVG_New_text($svg; "Salut tout le monde"; 20; 60)
//______________________________________________________
: (False:C215) // Denis report
- $Dom_arc:=SVG_New_arc($Dom_svg; 55; 55; 50; 0; 365; "steelblue"; "steelblue:50")
- SVG_New_text($Dom_svg; "365º"; 45; 50)
- $Dom_arc:=SVG_New_arc($Dom_svg; 150; 150; 50; 0; 360; "steelblue"; "steelblue:50")
- SVG_New_text($Dom_svg; "360º"; 140; 145)
- $Dom_arc:=SVG_New_arc($Dom_svg; 250; 250; 50; 0; 359; "steelblue"; "steelblue:50")
- SVG_New_text($Dom_svg; "359º"; 240; 245)
+ $Dom_arc:=SVG_New_arc($svg; 55; 55; 50; 0; 365; "steelblue"; "steelblue:50")
+ SVG_New_text($svg; "365º"; 45; 50)
+ $Dom_arc:=SVG_New_arc($svg; 150; 150; 50; 0; 360; "steelblue"; "steelblue:50")
+ SVG_New_text($svg; "360º"; 140; 145)
+ $Dom_arc:=SVG_New_arc($svg; 250; 250; 50; 0; 359; "steelblue"; "steelblue:50")
+ SVG_New_text($svg; "359º"; 240; 245)
//______________________________________________________
: (False:C215)
- $Dom_picture:=SVG_New_image($Dom_svg; "#Images/banner.svg") //OK
+ $Dom_picture:=SVG_New_image($svg; "#Images/banner.svg") // OK
//______________________________________________________
: (False:C215)
- //$Dom_text:=SVG_New_textArea ($Dom_svg;"test1\r\rtest2\r\r";10;10;300;100;"Times New Roman";9;Normal;Aligné à gauche)
- //$rayon:=2
- //$cx:=100
- //$cy:=100
- //$points:=Chaine($cx-$rayon)+","+Chaine($cy+$rayon)+" "+Chaine($cx)+","+Chaine($cy-$rayon)+" "+Chaine($cx+$rayon)+","+Chaine($cy+$rayon)+" "+Chaine($cx-$rayon)+","+Chaine($cy+$rayon)
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;"test1\r\rtest2\r\r";10;10;300;100;"Times New Roman";9;Normal;Aligné à gauche)
+ // $rayon:=2
+ // $cx:=100
+ // $cy:=100
+ // $points:=Chaine($cx-$rayon)+","+Chaine($cy+$rayon)+" "+Chaine($cx)+","+Chaine($cy-$rayon)+" "+Chaine($cx+$rayon)+","+Chaine($cy+$rayon)+" "+Chaine($cx-$rayon)+","+Chaine($cy+$rayon)
- //$couleurFond:="red"
- //$couleurLigne:="red"
+ // $couleurFond:="red"
+ // $couleurLigne:="red"
- //$R:=SVG_New_polygon ($Dom_svg;$points;$couleurLigne;$couleurFond;0,25)
+ // $R:=SVG_New_polygon ($Dom_svg;$points;$couleurLigne;$couleurFond;0,25)
- $Dom_text:=SVG_New_text($Dom_svg; "test"; 0; 0; "Helvetica"; 24; 0; Align left:K42:2; "red") // returns "", wrong
+ $Dom_text:=SVG_New_text($svg; "test"; 0; 0; "Helvetica"; 24; 0; Align left:K42:2; "red") // Returns "", wrong
$Boo_OK:=xml_referenceValid($Dom_circle)
$Boo_OK:=xml_referenceValid($Dom_text)
- //$Txt_onErrorBuffer:=Methode appelee sur erreur
+ // $Txt_onErrorBuffer:=Methode appelee sur erreur
// APPELER SUR ERREUR("noError")
- //$Dom_root:=DOM Lire element XML racine($Dom_circle)
- //$Boo_OK:=(OK=1)
- //APPELER SUR ERREUR($Txt_onErrorBuffer)
+ // $Dom_root:=DOM Lire element XML racine($Dom_circle)
+ // $Boo_OK:=(OK=1)
+ // APPELER SUR ERREUR($Txt_onErrorBuffer)
- //$Txt_onErrorBuffer:=Methode appelee sur erreur
+ // $Txt_onErrorBuffer:=Methode appelee sur erreur
// APPELER SUR ERREUR("noError")
- //$Dom_root:=DOM Lire element XML racine($Dom_text)
- //$Boo_OK:=(OK=1)
- //APPELER SUR ERREUR($Txt_onErrorBuffer)
+ // $Dom_root:=DOM Lire element XML racine($Dom_text)
+ // $Boo_OK:=(OK=1)
+ // APPELER SUR ERREUR($Txt_onErrorBuffer)
//______________________________________________________
: (False:C215)
READ PICTURE FILE:C678(Get 4D folder:C485(Current resources folder:K5:16)+"Images:icon.svg"; $Pic_buffer)
- $Dom_svg:=SVG_New(200; 100)
- SVG_SET_VIEWPORT_FILL($Dom_svg; "white")
- $Dom_picture:=SVG_New_embedded_image($Dom_svg; $Pic_buffer; 0; 0; ".svg")
+ $svg:=SVG_New(200; 100)
+ SVG_SET_VIEWPORT_FILL($svg; "white")
+ $Dom_picture:=SVG_New_embedded_image($svg; $Pic_buffer; 0; 0; ".svg")
SVG_SET_TRANSFORM_SCALE($Dom_picture; 0.5)
//______________________________________________________
: (False:C215)
- SVG_Post_comment($Dom_svg; "Create a group and define the stroke color as blue")
- $Dom_g:=SVG_New_group($Dom_svg)
- SVG_SET_STROKE_BRUSH($Dom_g; "blue")
+ SVG_Post_comment($svg; "Create a group and define the stroke color as blue")
+ $g:=SVG_New_group($svg)
+ SVG_SET_STROKE_BRUSH($g; "blue")
- SVG_Post_comment($Dom_g; "Create 3 rectangles with a color of contour \"inherited\"")
- SVG_SET_ID(SVG_New_rect($Dom_g; 10; 10; 400; 200; 0; 0; "inherit"; "white"); "rec_1")
- SVG_SET_ID(SVG_New_rect($Dom_g; 20; 20; 300; 150; 0; 0; "inherit"; "white"); "rec_2")
- SVG_SET_ID(SVG_New_rect($Dom_g; 30; 30; 200; 100; 0; 0; "inherit"; "white"); "rec_3")
+ SVG_Post_comment($g; "Create 3 rectangles with a color of contour \"inherited\"")
+ SVG_SET_ID(SVG_New_rect($g; 10; 10; 400; 200; 0; 0; "inherit"; "white"); "rec_1")
+ SVG_SET_ID(SVG_New_rect($g; 20; 20; 300; 150; 0; 0; "inherit"; "white"); "rec_2")
+ SVG_SET_ID(SVG_New_rect($g; 30; 30; 200; 100; 0; 0; "inherit"; "white"); "rec_3")
- SVGTool_SET_VIEWER_CALLBACK("testCallbackMethod")
+ SVGTool_SET_VIEWER_CALLBACK(Formula:C1597(testCallbackMethod).source)
//______________________________________________________
: (False:C215)
- SVG_SET_TRANSFORM_SCALE($Dom_svg; 2)
+ SVG_SET_TRANSFORM_SCALE($svg; 2)
// Groupe pour deplacement de l'origine
- $Dom_g:=SVG_New_group($Dom_SVG)
+ $g:=SVG_New_group($svg)
// Axes
- $Dom_line:=SVG_New_line($Dom_g; 0; 0; 300; 0; "red")
- $Dom_line:=SVG_New_line($Dom_g; 0; 0; 0; 300; "red")
- $Dom_origine:=SVG_New_circle($Dom_g; 0; 0; 1)
+ $line:=SVG_New_line($g; 0; 0; 300; 0; "red")
+ $line:=SVG_New_line($g; 0; 0; 0; 300; "red")
+ $Dom_origine:=SVG_New_circle($g; 0; 0; 1)
- $Dom_text:=DOM Create XML element:C865($Dom_g; "text")
+ $Dom_text:=DOM Create XML element:C865($g; "text")
DOM SET XML ELEMENT VALUE:C868($Dom_text; "Hello paul !")
DOM SET XML ATTRIBUTE:C866($Dom_text; \
"fill"; "blue")
- $Dom_text:=DOM Create XML element:C865($Dom_g; "text")
+ $Dom_text:=DOM Create XML element:C865($g; "text")
DOM SET XML ELEMENT VALUE:C868($Dom_text; "Hello paul !")
DOM SET XML ATTRIBUTE:C866($Dom_text; \
"y"; "1ex")
// Deplacement de l'origine
- SVG_SET_TRANSFORM_TRANSLATE($Dom_g; 50; 50)
+ SVG_SET_TRANSFORM_TRANSLATE($g; 50; 50)
//______________________________________________________
: (False:C215)
@@ -1744,153 +1764,154 @@ Case of
$Lon_x:=20
$Lon_y:=60
- SVG_SET_TRANSFORM_SCALE($Dom_svg; 4)
+ SVG_SET_TRANSFORM_SCALE($svg; 4)
- SVG_Post_comment($Dom_svg; "Groupe pour deplacement de l'origine")
- $Dom_g:=SVG_New_group($Dom_SVG)
+ SVG_Post_comment($svg; "Groupe pour deplacement de l'origine")
+ $g:=SVG_New_group($svg)
- SVG_Post_comment($Dom_g; "Quadrillage")
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_g; 0; 0; 400; 0; "blue:30"; 800); 1.1; 9)
- SVG_SET_STROKE_DASHARRAY(SVG_New_line($Dom_g; 0; 0; 0; 400; "blue:30"; 800); 1.1; 9)
+ SVG_Post_comment($g; "Quadrillage")
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($g; 0; 0; 400; 0; "blue:30"; 800); 1.1; 9)
+ SVG_SET_STROKE_DASHARRAY(SVG_New_line($g; 0; 0; 0; 400; "blue:30"; 800); 1.1; 9)
- SVG_Post_comment($Dom_g; "Axes")
- $Dom_line:=SVG_New_line($Dom_g; 0; 0; 300; 0; "red")
- $Dom_line:=SVG_New_line($Dom_g; 0; 0; 0; 300; "red")
- $Dom_text:=SVG_New_text($Dom_g; "0"; -3.5; -15)
- $Dom_text:=SVG_New_text($Dom_g; "0"; -10; -8)
- $Dom_origine:=SVG_New_circle($Dom_g; 0; 0; 1)
+ SVG_Post_comment($g; "Axes")
+ $line:=SVG_New_line($g; 0; 0; 300; 0; "red")
+ $line:=SVG_New_line($g; 0; 0; 0; 300; "red")
+ $Dom_text:=SVG_New_text($g; "0"; -3.5; -15)
+ $Dom_text:=SVG_New_text($g; "0"; -10; -8)
+ $Dom_origine:=SVG_New_circle($g; 0; 0; 1)
// Largeur et hauteur de l'objet
$Lon_recWidth:=60
$Lon_recHeight:=20
- SVG_Post_comment($Dom_g; "Fantome de l'objet")
- $Dom_rect:=SVG_New_rect($Dom_g; $Lon_x; $Lon_y; $Lon_recWidth; $Lon_recHeight; 0; 0; "black:60"; "yellow:80")
+ SVG_Post_comment($g; "Fantome de l'objet")
+ $Dom_rect:=SVG_New_rect($g; $Lon_x; $Lon_y; $Lon_recWidth; $Lon_recHeight; 0; 0; "black:60"; "yellow:80")
// Coordonnées du centre
$Lon_middleX:=($Lon_recWidth/2)+$Lon_x
$Lon_middleY:=($Lon_recHeight/2)+$Lon_y
- SVG_Post_comment($Dom_g; "Objet avec rotation")
- $Dom_rect:=SVG_New_rect($Dom_g; $Lon_x; $Lon_y; $Lon_recWidth; $Lon_recHeight; 0; 0; "black"; "blue:60")
+ SVG_Post_comment($g; "Objet avec rotation")
+ $Dom_rect:=SVG_New_rect($g; $Lon_x; $Lon_y; $Lon_recWidth; $Lon_recHeight; 0; 0; "black"; "blue:60")
SVG_SET_TRANSFORM_ROTATE($Dom_rect; -90; $Lon_middleX; $Lon_middleY)
$Lon_tx:=-($Lon_recHeight-$Lon_recWidth)/2
$Lon_ty:=($Lon_recHeight-$Lon_recWidth)/2
SVG_SET_TRANSFORM_TRANSLATE($Dom_rect; $Lon_tx; $Lon_ty)
- //}
+ // }
// Deplacement de l'origine
- SVG_SET_TRANSFORM_TRANSLATE($Dom_g; 50; 50)
+ SVG_SET_TRANSFORM_TRANSLATE($g; 50; 50)
//______________________________________________________
: (False:C215)
// Define a style
$Txt_style:=".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width:8; stroke-opacity: 0.6}"
- SVG_Define_style($Dom_SVG; $Txt_style)
+ SVG_Define_style($svg; $Txt_style)
// Create a group and set a default style
- $Dom_g:=SVG_New_group($Dom_SVG)
- SVG_SET_CLASS($Dom_g; "colored")
+ $g:=SVG_New_group($svg)
+ SVG_SET_CLASS($g; "colored")
// Draw a rectangle
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
// Draw a circle then overload the style with a custom stroke color
- $Dom_circle:=SVG_New_circle($Dom_g; 300; 250; 100; ""; "")
+ $Dom_circle:=SVG_New_circle($g; 300; 250; 100; ""; "")
SVG_SET_STROKE_BRUSH($Dom_circle; "blue")
//______________________________________________________
: (False:C215) // ACI0065221
- $Txt_buffer:="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ $t:="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
$Lon_width:=400
$Lon_height:=100
- $Txt_buffer:=SVG_New_textArea($Dom_svg; $Txt_buffer; 30; 21; $Lon_width; $Lon_height; _O_Font name:C462(1024); 20; Bold:K14:2+Italic:K14:3+Underline:K14:4; On the left:K39:2)
+ $t:=SVG_New_textArea($svg; $t; 30; 21; $Lon_width; $Lon_height; _O_Font name:C462(1024); 20; Bold:K14:2+Italic:K14:3+Underline:K14:4; On the left:K39:2)
- SVGTool_SHOW_IN_VIEWER($Txt_buffer)
+ SVGTool_SHOW_IN_VIEWER($t)
//______________________________________________________
: (False:C215) // ACI0065957
- $Txt_buffer:="this is a line"+Char:C90(13)+"this is a line"+Char:C90(13)+"this is a line"+Char:C90(13)+"this is a line"
+ $t:="this is a line"+Char:C90(13)+"this is a line"+Char:C90(13)+"this is a line"+Char:C90(13)+"this is a line"
- SVG_New_text($Dom_svg; $Txt_buffer; 10; 10; "Lucida Grande"; 12; 1; Align left:K42:2; ""; 0; 2)
+ SVG_New_text($svg; $t; 10; 10; "Lucida Grande"; 12; 1; Align left:K42:2; ""; 0; 2)
//______________________________________________________
: (True:C214)
- //$Dom_svg:=SVG_New (440;800)
+ // $Dom_svg:=SVG_New (440;800)
- //$Dom_root:=SVG_New_group ($Dom_svg) // origin
+ // $Dom_root:=SVG_New_group ($Dom_svg) // origin
- //SVG_SET_STROKE_DASHARRAY (SVG_New_line ($Dom_root;0;0;0;400);2;1)
- //SVG_SET_STROKE_DASHARRAY (SVG_New_line ($Dom_root;0;0;400;0);2;1)
- //$Dom_rect:=SVG_New_rect ($Dom_root;0;0;400;400;0;0;"none";"white")
+ // SVG_SET_STROKE_DASHARRAY (SVG_New_line ($Dom_root;0;0;0;400);2;1)
+ // SVG_SET_STROKE_DASHARRAY (SVG_New_line ($Dom_root;0;0;400;0);2;1)
+ // $Dom_rect:=SVG_New_rect ($Dom_root;0;0;400;400;0;0;"none";"white")
- //$Dom_group:=SVG_New_group ($Dom_root)
- //SVG_SET_FONT_COLOR ($Dom_group;"red")
+ // $Dom_group:=SVG_New_group ($Dom_root)
+ // SVG_SET_FONT_COLOR ($Dom_group;"red")
- //$Lon_x:=0
- //$Lon_y:=0
- //$Lon_width:=180
- //$Lon_height:=40
+ // $Lon_x:=0
+ // $Lon_y:=0
+ // $Lon_width:=180
+ // $Lon_height:=40
- //$Dom_rect:=SVG_New_rect ($Dom_group;$Lon_x;$Lon_y;$Lon_width;$Lon_height;0;0;"blue";"none")
- //$Dom_svg_TextArea_t:=SVG_New_textArea ($Dom_group;"Hello world !";$Lon_x;$Lon_y;$Lon_width;$Lon_height;"Arial";24;0;Centré)
+ // $Dom_rect:=SVG_New_rect ($Dom_group;$Lon_x;$Lon_y;$Lon_width;$Lon_height;0;0;"blue";"none")
+ // $Dom_svg_TextArea_t:=SVG_New_textArea ($Dom_group;"Hello world !";$Lon_x;$Lon_y;$Lon_width;$Lon_height;"Arial";24;0;Centré)
- //SVG_SET_FONT_FAMILY ($Dom_svg_TextArea_t;"optima";"Lithos Pro Black")
+ // SVG_SET_FONT_FAMILY ($Dom_svg_TextArea_t;"optima";"Lithos Pro Black")
- //Si ($Boo_rotate)
+ // Si ($Boo_rotate)
- //SVG_SET_TRANSFORM_ROTATE ($Dom_rect;-90;$Lon_x;$Lon_y)
- //SVG_SET_TRANSFORM_ROTATE ($Dom_svg_TextArea_t;-90;$Lon_x;$Lon_y)
+ // SVG_SET_TRANSFORM_ROTATE ($Dom_rect;-90;$Lon_x;$Lon_y)
+ // SVG_SET_TRANSFORM_ROTATE ($Dom_svg_TextArea_t;-90;$Lon_x;$Lon_y)
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_group;0;$Lon_width)
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_group;0;$Lon_width)
// Fin de si
- //SVG_SET_TRANSFORM_TRANSLATE ($Dom_root;22;185)
- SVG_Define_style($Dom_svg; "monstyle.css")
+ // SVG_SET_TRANSFORM_TRANSLATE ($Dom_root;22;185)
+ SVG_Define_style($svg; "monstyle.css")
// Define a style
- //$Txt_style:=".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width:8; stroke-opacity: 0.6}"
- //SVG_Define_style ($Dom_SVG;$Txt_style)
- //SVG_Define_style ($Dom_svg;"#dev/monstyle.css")
+ // $Txt_style:=".colored {fill: yellow; fill-opacity: 0.6; stroke: red; stroke-width:8; stroke-opacity: 0.6}"
+ // SVG_Define_style ($Dom_SVG;$Txt_style)
+ // SVG_Define_style ($Dom_svg;"#dev/monstyle.css")
- SVG_Define_linear_gradient($Dom_svg; "#BlockS"; "olive:70"; "palegreen:50")
+ SVG_Define_linear_gradient($svg; "#BlockS"; "olive:70"; "palegreen:50")
// Create a group and set a default style
- $Dom_g:=SVG_New_group($Dom_SVG)
+ $g:=SVG_New_group($svg)
- //SVG_SET_CLASS ($Dom_g;"colored")
+ // SVG_SET_CLASS ($Dom_g;"colored")
// Draw a rectangle
- $Dom_rect:=SVG_New_rect($Dom_g; 25; 30; 320; 240; 10; 10; ""; "")
+ $Dom_rect:=SVG_New_rect($g; 25; 30; 320; 240; 10; 10; ""; "")
- //SVG_SET_FILL_BRUSH ($Dom_rect;"url(#BlockS)")
+ // SVG_SET_FILL_BRUSH ($Dom_rect;"url(#BlockS)")
- //SVGTool_SHOW_IN_VIEWER ($Dom_svg)
+ // SVGTool_SHOW_IN_VIEWER ($Dom_svg)
- //SVG_SAVE_AS_TEXT ($Dom_svg;Dossier systeme(Bureau)+"ACI0064988.svg")
+ // SVG_SAVE_AS_TEXT ($Dom_svg;Dossier systeme(Bureau)+"ACI0064988.svg")
- //$Dom_text:=SVG_New_textArea ($Dom_svg;"Hello world !\rIt's time to wake up\rAnother line for a test")
- //$Txt_buffer:=SVG_Get_text ($Dom_text)
+ // $Dom_text:=SVG_New_textArea ($Dom_svg;"Hello world !\rIt's time to wake up\rAnother line for a test")
+ // $Txt_buffer:=SVG_Get_text ($Dom_text)
- //SVG_SET_TEXTAREA_TEXT ($Dom_text;"Nouveau texte\ravec retour chariot")
+ // SVG_SET_TEXTAREA_TEXT ($Dom_text;"Nouveau texte\ravec retour chariot")
//______________________________________________________
End case
-//SVG_SAVE_AS_PICTURE ($Dom_svg;System folder(Desktop)+"DEV"+Folder separator+"test.svg";".svg")
-//SVG_SAVE_AS_TEXT ($Dom_svg;System folder(Desktop)+"DEV"+Folder separator+"export.svg")
+// SVG_SAVE_AS_PICTURE ($Dom_svg;System folder(Desktop)+"DEV"+Folder separator+"test.svg";".svg")
+
+// SVG_SAVE_AS_TEXT ($Dom_svg;System folder(Desktop)+"DEV"+Folder separator+"export.svg")
// View the result
-SVGTool_SHOW_IN_VIEWER($Dom_svg)
+SVGTool_SHOW_IN_VIEWER($svg)
// Don't forget to clear the memory
-SVG_CLEAR($Dom_svg)
+SVG_CLEAR($svg)
// ALERT(<>DOCUMENT)
\ No newline at end of file
diff --git a/Project/Sources/Methods/Compiler_SVG_Public.4dm b/Project/Sources/Methods/Compiler_SVG_Public.4dm
index e2bc6c6..83d3d09 100644
--- a/Project/Sources/Methods/Compiler_SVG_Public.4dm
+++ b/Project/Sources/Methods/Compiler_SVG_Public.4dm
@@ -4,67 +4,6 @@
// Created 04/07/08 by Vincent de Lachaux
// ----------------------------------------------------
-//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-//Document
-//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-If (False:C215)
-
- //SVG_SET_DEFAULT_ENCODING
- _O_C_TEXT:C284(SVG_SET_DEFAULT_ENCODING; $1)
-
- //SVG_Get_default_encoding
- _O_C_TEXT:C284(SVG_Get_default_encoding; $0)
-
- //SVG_CLEAR
- _O_C_TEXT:C284(SVG_CLEAR; $1)
-
- //SVG_Copy
- _O_C_TEXT:C284(SVG_Copy; $0)
- _O_C_TEXT:C284(SVG_Copy; $1)
-
- //SVG_Export_to_picture
- _O_C_PICTURE:C286(SVG_Export_to_picture; $0)
- _O_C_TEXT:C284(SVG_Export_to_picture; $1)
- _O_C_LONGINT:C283(SVG_Export_to_picture; $2)
-
- //SVG_Export_to_XML
- _O_C_TEXT:C284(SVG_Export_to_XML; $0)
- _O_C_TEXT:C284(SVG_Export_to_XML; $1)
-
- //SVG_New
- _O_C_TEXT:C284(SVG_New; $0)
- _O_C_REAL:C285(SVG_New; $1)
- _O_C_REAL:C285(SVG_New; $2)
- _O_C_TEXT:C284(SVG_New; $3)
- _O_C_TEXT:C284(SVG_New; $4)
- _O_C_BOOLEAN:C305(SVG_New; $5)
- _O_C_LONGINT:C283(SVG_New; $6)
-
- //SVG_Open_file
- _O_C_TEXT:C284(SVG_Open_file; $0)
- _O_C_TEXT:C284(SVG_Open_file; $1)
- _O_C_BOOLEAN:C305(SVG_Open_file; $2)
-
- //SVG_Open_picture
- _O_C_TEXT:C284(SVG_Open_picture; $0)
- _O_C_PICTURE:C286(SVG_Open_picture; $1)
-
- //SVG_SAVE_AS_PICTURE
- _O_C_TEXT:C284(SVG_SAVE_AS_PICTURE; $1)
- _O_C_TEXT:C284(SVG_SAVE_AS_PICTURE; $2)
- _O_C_TEXT:C284(SVG_SAVE_AS_PICTURE; $3)
-
- //SVG_SAVE_AS_TEXT
- _O_C_TEXT:C284(SVG_SAVE_AS_TEXT; $1)
- _O_C_TEXT:C284(SVG_SAVE_AS_TEXT; $2)
-
- //SVG_Validate_file
- _O_C_BOOLEAN:C305(SVG_Validate_file; $0)
- _O_C_TEXT:C284(SVG_Validate_file; $1)
-
- //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-End if
-
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//Structure & definition
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
diff --git a/Project/Sources/Methods/SVG_CLEAR.4dm b/Project/Sources/Methods/SVG_CLEAR.4dm
index c031105..f32177b 100644
--- a/Project/Sources/Methods/SVG_CLEAR.4dm
+++ b/Project/Sources/Methods/SVG_CLEAR.4dm
@@ -1,56 +1,49 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_CLEAR
- // Date et heure : 16/03/06, 10:07:53
- // Framework SVgg
- // Author : Gérald Czwiklinski
- // ----------------------------------------------------
- // Releases the memory occupied by a SVG tree.
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (09/09/08)
- // Merge with CLEAR_ALL
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (16/06/08)
- // 2004 -> v11
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (04/07/11)
- // If the reference is an object reference, the object is deleted
- // ----------------------------------------------------
-C_TEXT:C284($1)
+// ----------------------------------------------------
+// Method : SVG_CLEAR
+// Date et heure : 16/03/06, 10:07:53
+// Framework SVgg
+// Author : Gérald Czwiklinski
+// ----------------------------------------------------
+// Releases the memory occupied by a SVG tree.
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (09/09/08)
+// Merge with CLEAR_ALL
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (16/06/08)
+// 2004 -> v11
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (04/07/11)
+// If the reference is an object reference, the object is deleted
+// ----------------------------------------------------
+#DECLARE($svgObject : Text)
-C_LONGINT:C283($Lon_parameters;$Lon_x)
-C_TEXT:C284($Dom_root;$Dom_svgObject;$kTxt_currentMethod;$kTxt_Error_Method)
+var $kTxt_currentMethod; $root : Text
+var $Lon_x : Integer
-If (False:C215)
- C_TEXT:C284(SVG_CLEAR ;$1)
-End if
+Compiler_SVG
-Compiler_SVG
+$kTxt_currentMethod:="SVG_CLEAR" // Nom methode courante
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:="SVG_CLEAR" //Nom methode courante
-
-If ($Lon_parameters>=1)
-
- $Dom_svgObject:=$1
+If (Count parameters:C259>=1)
- If (Asserted:C1132(xml_referenceValid ($Dom_svgObject);Get localized string:C991("error_badReference")))
+ If (Asserted:C1132(xml_referenceValid($svgObject); Localized string:C991("error_badReference")))
- Component_errorHandler ("init";$kTxt_currentMethod)
+ Component_errorHandler("init"; $kTxt_currentMethod)
- $Dom_root:=DOM Get root XML element:C1053($Dom_svgObject)
+ $root:=DOM Get root XML element:C1053($svgObject)
- If ($Dom_root=$Dom_svgObject)
+ If ($root=$svgObject)
- // Close the XML tree
- DOM CLOSE XML:C722($Dom_svgObject)
+ // Close the XML tree
+ DOM CLOSE XML:C722($svgObject)
If (OK=1)
- // Delete the registered reference {
+ // Delete the registered reference {
If (Storage:C1525.svg.docs#Null:C1517)
- $Lon_x:=Storage:C1525.svg.docs.indexOf($Dom_svgObject)
+ $Lon_x:=Storage:C1525.svg.docs.indexOf($svgObject)
If ($Lon_x#-1)
@@ -61,43 +54,41 @@ If ($Lon_parameters>=1)
End use
End if
End if
- //}
+
+ // }
End if
Else
- // Delete the element
- DOM REMOVE XML ELEMENT:C869($Dom_svgObject)
+ // Delete the element
+ DOM REMOVE XML ELEMENT:C869($svgObject)
End if
- ASSERT:C1129(Component_errorHandler ("deinit"))
+ ASSERT:C1129(Component_errorHandler("deinit"))
Else
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) // The reference is not a svg object
+ ASSERT:C1129(Component_putError(8852; $kTxt_currentMethod)) // The reference is not a svg object
End if
Else
- $kTxt_Error_Method:=Method called on error:C704
-
- ON ERR CALL:C155("xToolBox_NO_ERROR") //=========================== < NO ERROR >
-
- Use (Storage:C1525)
+ Try // < NO ERROR >
- For each ($Dom_svgObject;Storage:C1525.svg.docs)
+ Use (Storage:C1525)
- DOM CLOSE XML:C722($Dom_svgObject)
+ For each ($svgObject; Storage:C1525.svg.docs)
+
+ DOM CLOSE XML:C722($svgObject)
+
+ End for each
- End for each
-
- Storage:C1525.svg.docs.clear()
+ Storage:C1525.svg.docs.clear()
+
+ End use
- End use
-
- ON ERR CALL:C155($kTxt_Error_Method) //============================= NO ERROR >
-
+ End try // NO ERROR >
End if
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Copy.4dm b/Project/Sources/Methods/SVG_Copy.4dm
index 206c90f..bb7fcd2 100644
--- a/Project/Sources/Methods/SVG_Copy.4dm
+++ b/Project/Sources/Methods/SVG_Copy.4dm
@@ -1,83 +1,61 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Copy
- // Created 16/06/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- // Create a copy of the svg document
- // ----------------------------------------------------
-C_TEXT:C284($0)
-C_TEXT:C284($1)
+// ----------------------------------------------------
+// Method : SVG_Copy
+// Created 16/06/08 by Vincent de Lachaux
+// ----------------------------------------------------
+// Description
+// Create a copy of the svg document
+// ----------------------------------------------------
+#DECLARE($svgObject : Text) : Text
-C_LONGINT:C283($Lon_parameters)
-C_TEXT:C284($Dom_new;$kTxt_currentMethod;$Txt_Buffer;$Txt_svgObject)
+var $CURRENT_METHOD; $root; $t : Text
-If (False:C215)
- C_TEXT:C284(SVG_Copy ;$0)
- C_TEXT:C284(SVG_Copy ;$1)
-End if
+Compiler_SVG
-Compiler_SVG
-
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:="SVG_Copy" //Nom methode courante
+$CURRENT_METHOD:="SVG_Copy"
Case of
- //______________________________________________________
- : ($Lon_parameters=0)
+ //______________________________________________________
+ : (Count parameters:C259=0)
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Argument missing
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Argument missing
- //________________________________________
- : (Not:C34(xml_referenceValid ($1)))
+ //________________________________________
+ : (Not:C34(xml_referenceValid($svgObject)))
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) //The reference is not a svg object
+ ASSERT:C1129(Component_putError(8852; $CURRENT_METHOD)) // The reference is not a svg object
- //______________________________________________________
+ //______________________________________________________
Else
- Component_errorHandler ("init";$kTxt_currentMethod)
-
- $Txt_svgObject:=$1
-
- // ___________________
- // / ACI0072296
- // || Date 18/07/11
- //( ) Vincent de Lachaux
- // ___________________
- XML SET OPTIONS:C1090($Txt_svgObject;XML indentation:K45:34;XML no indentation:K45:36)
+ Component_errorHandler("init"; $CURRENT_METHOD)
- // ___________________
+ // ___________________
+ // / ACI0072296
+ // || Date 18/07/11
+ // ( ) Vincent de Lachaux
+ // ___________________
+ XML SET OPTIONS:C1090($svgObject; XML indentation:K45:34; XML no indentation:K45:36)
+ // ___________________
- DOM EXPORT TO VAR:C863($Txt_svgObject;$Txt_Buffer)
+ DOM EXPORT TO VAR:C863($svgObject; $t)
- If (OK=1)
+ If (Bool:C1537(OK))
- $Dom_new:=DOM Parse XML variable:C720($Txt_Buffer)
+ $root:=DOM Parse XML variable:C720($t)
- If (OK=1)
+ If (Bool:C1537(OK))
- // Store the reference {
- Use (Storage:C1525.svg)
-
- If (Storage:C1525.svg.docs=Null:C1517)
-
- Storage:C1525.svg.docs:=New shared collection:C1527
-
- End if
-
- Storage:C1525.svg.docs.push($Dom_new)
-
- End use
- //}
-
- $0:=$Dom_new
+ // Store the reference
+ pushReference($root)
End if
End if
- ASSERT:C1129(Component_errorHandler ("deinit"))
+ ASSERT:C1129(Component_errorHandler("deinit"))
+
+ return $root
- //______________________________________________________
+ //______________________________________________________
End case
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Export_to_XML.4dm b/Project/Sources/Methods/SVG_Export_to_XML.4dm
index f613a7e..e6231e4 100644
--- a/Project/Sources/Methods/SVG_Export_to_XML.4dm
+++ b/Project/Sources/Methods/SVG_Export_to_XML.4dm
@@ -1,92 +1,65 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Export_to_XML
- // Created 02/09/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (08/12/09)
- // ACI0064079
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
-C_TEXT:C284($0)
-C_TEXT:C284($1)
+// ----------------------------------------------------
+// Method : SVG_Export_to_XML
+// Created 02/09/08 by Vincent de Lachaux
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (08/12/09)
+// ACI0064079
+// ----------------------------------------------------
+#DECLARE($svgObject : Text) : Text
-C_LONGINT:C283($Lon_i;$Lon_parameters)
-C_TEXT:C284($kTxt_currentMethod;$Txt_buffer;$Txt_name;$Txt_svgObject;$Txt_value)
+var $name; $value; $xml : Text
+var $i : Integer
-If (False:C215)
- C_TEXT:C284(SVG_Export_to_XML ;$0)
- C_TEXT:C284(SVG_Export_to_XML ;$1)
-End if
+Compiler_SVG
-Compiler_SVG
-
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
-
-If ($Lon_parameters>=1)
+If (Count parameters:C259>=1)
- $Txt_svgObject:=$1
-
- If (Asserted:C1132(xml_referenceValid ($Txt_svgObject);Get localized string:C991("error_badReference")))
-
- Component_errorHandler ("init";$kTxt_currentMethod)
+ If (Asserted:C1132(xml_referenceValid($svgObject); Localized string:C991("error_badReference")))
- //http://forums.4d.fr/Post/FR/6124839/1/6134419#6134419 {
- DOM GET XML ELEMENT NAME:C730($Txt_svgObject;$Txt_name)
-
- If ($Txt_name="image")
+ Try
- For ($Lon_i;1;DOM Count XML attributes:C727($Txt_svgObject);1)
-
- DOM GET XML ATTRIBUTE BY INDEX:C729($Txt_svgObject;$Lon_i;$Txt_name;$Txt_value)
+ // Mark:Http://forums.4d.fr/Post/FR/6124839/1/6134419#6134419
+ DOM GET XML ELEMENT NAME:C730($svgObject; $name)
+
+ If ($name="image")
- If ($Txt_name="xlink:href")
+ For ($i; 1; DOM Count XML attributes:C727($svgObject); 1)
- DOM SET XML ATTRIBUTE:C866($Txt_svgObject;\
- "xmlns:xlink";"http://www.w3.org/1999/xlink")
+ DOM GET XML ATTRIBUTE BY INDEX:C729($svgObject; $i; $name; $value)
- $Lon_i:=MAXLONG:K35:2-1
-
- End if
- End for
- End if
- //}
-
- DOM EXPORT TO VAR:C863($Txt_svgObject;$Txt_buffer)
-
- If (OK=1)
+ If ($name="xlink:href")
+
+ DOM SET XML ATTRIBUTE:C866($svgObject; \
+ "xmlns:xlink"; "http://www.w3.org/1999/xlink")
+
+ break
+
+ End if
+ End for
+ End if
- // ___________________
- // / ACI00
- // || Date 07/12/11
- //( ) Vincent de Lachaux
- // ___________________
- //Sometimes the command return a string without the first <
- // ___________________
- If (Position:C15("<";$Txt_buffer)#1)
+ DOM EXPORT TO VAR:C863($svgObject; $xml)
+
+ // Mark:Sometimes the command return a string without the first <
+ If (Position:C15("<"; $xml)#1)
- $Txt_buffer:="<"+$Txt_buffer
+ $xml:="<"+$xml
End if
- // ___________________
-
- $0:=$Txt_buffer
-
- End if
+ End try
- ASSERT:C1129(Component_errorHandler ("deinit"))
+ return $xml
Else
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) //The reference is not a svg object
+ ASSERT:C1129(Component_putError(8852; Current method name:C684)) // The reference is not a svg object
End if
Else
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
+ ASSERT:C1129(Component_putError(8850; Current method name:C684)) // Parameters Missing
End if
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Export_to_picture.4dm b/Project/Sources/Methods/SVG_Export_to_picture.4dm
index 23a3acb..91e75b1 100644
--- a/Project/Sources/Methods/SVG_Export_to_picture.4dm
+++ b/Project/Sources/Methods/SVG_Export_to_picture.4dm
@@ -1,64 +1,32 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Export_to_picture
- // Created 22/07/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
-C_PICTURE:C286($0)
-C_TEXT:C284($1)
-C_LONGINT:C283($2)
+// ----------------------------------------------------
+// Method : SVG_Export_to_picture
+// Created 22/07/08 by Vincent de Lachaux
+// ----------------------------------------------------
+#DECLARE($svgObject : Text; $exportType : Integer) : Picture
-C_LONGINT:C283($Lon_exportType;$Lon_parameters)
-C_PICTURE:C286($Pic_Buffer)
-C_TEXT:C284($kTxt_currentMethod;$Txt_svgObject)
+var $picture : Picture
-If (False:C215)
- C_PICTURE:C286(SVG_Export_to_picture ;$0)
- C_TEXT:C284(SVG_Export_to_picture ;$1)
- C_LONGINT:C283(SVG_Export_to_picture ;$2)
-End if
+Compiler_SVG
-Compiler_SVG
-
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
-
-If ($Lon_parameters>=1)
-
- $Txt_svgObject:=$1
+If (Count parameters:C259>=1)
- $Lon_exportType:=Copy XML data source:K45:17
+ $exportType:=$exportType#0 ? $exportType : Copy XML data source:K45:17
- If ($Lon_parameters>=2)
-
- $Lon_exportType:=$2
-
- End if
-
- If (Asserted:C1132(xml_referenceValid ($Txt_svgObject);Get localized string:C991("error_badReference")))
-
- Component_errorHandler ("init";$kTxt_currentMethod)
-
- SVG EXPORT TO PICTURE:C1017($Txt_svgObject;$Pic_Buffer;$Lon_exportType)
+ If (Asserted:C1132(xml_referenceValid($svgObject); Localized string:C991("error_badReference")))
- If (OK=1)
-
- $0:=$Pic_Buffer
-
- End if
+ Try(SVG EXPORT TO PICTURE:C1017($svgObject; $picture; $exportType))
- ASSERT:C1129(Component_errorHandler ("deinit"))
+ return $picture
Else
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) //The reference is not a svg object
+ ASSERT:C1129(Component_putError(8852; Current method name:C684)) // The reference is not a svg object
End if
Else
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
+ ASSERT:C1129(Component_putError(8850; Current method name:C684)) // Parameters Missing
End if
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Get_default_encoding.4dm b/Project/Sources/Methods/SVG_Get_default_encoding.4dm
index 5bf5bf7..5842399 100644
--- a/Project/Sources/Methods/SVG_Get_default_encoding.4dm
+++ b/Project/Sources/Methods/SVG_Get_default_encoding.4dm
@@ -1,21 +1,8 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Get_default_encoding
- // Created 07/04/10 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
- // Declarations
-C_TEXT:C284($0)
+// ----------------------------------------------------
+// Method : SVG_Get_default_encoding
+// Created 07/04/10 by Vincent de Lachaux
+// ----------------------------------------------------
+#DECLARE() : Text
-If (False:C215)
- C_TEXT:C284(SVG_Get_default_encoding ;$0)
-End if
-
- // ----------------------------------------------------
- // Initialisations
-
- // ----------------------------------------------------
-
-$0:=Storage:C1525.svg.encoding
\ No newline at end of file
+return String:C10(Storage:C1525.svg.encoding)
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_New.4dm b/Project/Sources/Methods/SVG_New.4dm
index a1cb11b..c07fb9a 100644
--- a/Project/Sources/Methods/SVG_New.4dm
+++ b/Project/Sources/Methods/SVG_New.4dm
@@ -1,238 +1,189 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_New
- // Created 16/03/06, 10:07:53
- // Framework SVgg
- // Author : Gérald Czwiklinski
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (16/04/08)
- // 2004 -> v11
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (08/07/08)
- // Added viewBox and preserveAspectRatio
- // ----------------------------------------------------
-C_TEXT:C284($0)
-C_REAL:C285($1)
-C_REAL:C285($2)
-C_TEXT:C284($3)
-C_TEXT:C284($4)
-C_BOOLEAN:C305($5)
-C_LONGINT:C283($6)
+// ----------------------------------------------------
+// Method : SVG_New
+// Created 16/03/06, 10:07:53
+// Framework SVgg
+// Author : Gérald Czwiklinski
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (16/04/08)
+// 2004 -> v11
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (08/07/08)
+// Added viewBox and preserveAspectRatio
+// ----------------------------------------------------
+#DECLARE($width : Real; $height : Real; $title : Text; $description : Text; $viewBox : Boolean; $preserveAspectRatio : Integer) : Text
-C_BOOLEAN:C305($Boo_viewBox)
-C_LONGINT:C283($Lon_parameters;$Lon_preserveAspectRatio)
-C_REAL:C285($Num_height;$Num_width)
-C_TEXT:C284($kTxt_currentMethod;$Txt_buffer;$Txt_description;$Txt_metaData;$Txt_nodeReference;$Txt_rootReference)
-C_TEXT:C284($Txt_title)
+var $CURRENT_METHOD; $node; $root; $Txt_metaData : Text
-If (False:C215)
- C_TEXT:C284(SVG_New ;$0)
- C_REAL:C285(SVG_New ;$1)
- C_REAL:C285(SVG_New ;$2)
- C_TEXT:C284(SVG_New ;$3)
- C_TEXT:C284(SVG_New ;$4)
- C_BOOLEAN:C305(SVG_New ;$5)
- C_LONGINT:C283(SVG_New ;$6)
-End if
-
-Compiler_SVG
+Compiler_SVG
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:="SVG_New" // Nom methode courante
-
-If ($Lon_parameters>=2) // Predefined width & height
-
- $Num_width:=$1
- $Num_height:=$2
-
- If ($Lon_parameters>=3) // Document title
-
- $Txt_title:=$3
-
- If ($Lon_parameters>=4) // Document description
-
- $Txt_description:=$4
-
- If ($Lon_parameters>=5) // ViewBox
-
- $Boo_viewBox:=$5
-
- If ($Lon_parameters>=6) // PreserveAspectRatio
-
- $Lon_preserveAspectRatio:=$6
-
- End if
- End if
- End if
- End if
-End if
+$CURRENT_METHOD:="SVG_New"
-Component_errorHandler ("init";$kTxt_currentMethod)
+Component_errorHandler("init"; $CURRENT_METHOD)
-$Txt_rootReference:=DOM Create XML Ref:C861("svg";"http://www.w3.org/2000/svg")
+$root:=DOM Create XML Ref:C861("svg"; "http://www.w3.org/2000/svg")
-If (OK=1)
+If (Bool:C1537(OK))
- DOM SET XML DECLARATION:C859($Txt_rootReference;Storage:C1525.svg.encoding;True:C214)
- XML SET OPTIONS:C1090($Txt_rootReference;XML indentation:K45:34;2-Num:C11(Storage:C1525.svg.options ?? 5))
+ DOM SET XML DECLARATION:C859($root; Storage:C1525.svg.encoding; True:C214)
+ XML SET OPTIONS:C1090($root; XML indentation:K45:34; 2-Num:C11(Storage:C1525.svg.options ?? 5))
End if
-If (OK=1)
+If (Bool:C1537(OK))\
+ && (Storage:C1525.svg.options ?? 16)
+
+ // Add the xmlns:link
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "xmlns:xlink"; "http://www.w3.org/1999/xlink")
- If (Storage:C1525.svg.options ?? 16)
-
- // Add the xmlns:link
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "xmlns:xlink";"http://www.w3.org/1999/xlink")
-
- End if
End if
Case of
- //______________________________________________________
- : (OK=0)
+ //______________________________________________________
+ : (Not:C34(Bool:C1537(OK)))
+
+ //
- //______________________________________________________
+ //______________________________________________________
: (SVG_Lon_Error#0)\
- | ($Txt_rootReference="0000000000000000")
+ | ($root="0000000000000000")
OK:=0
- //______________________________________________________
+ //______________________________________________________
Else
If (Not:C34(Storage:C1525.svg.options ?? 8))
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "viewport-fill";"white")
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "viewport-fill-opacity";1)
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "viewport-fill"; "white")
+
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "viewport-fill-opacity"; 1)
End if
If (Storage:C1525.svg.options ?? 11)
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "shape-rendering";"crispEdges")
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "shape-rendering"; "crispEdges")
End if
- // Dimensions {
- If ($Num_width>0)
+ // Mark:-Dimensions
+ If ($width>0)
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "width";String:C10($Num_width;"&xml"))
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "width"; String:C10($width; "&xml"))
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "height";String:C10($Num_height;"&xml"))
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "height"; String:C10($height; "&xml"))
End if
End if
- //}
- // ViewBox {
- If (OK=1)\
- & ($Boo_viewBox)
+ // Mark:-ViewBox
+ If (Bool:C1537(OK))\
+ && ($viewBox)
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "viewBox";"0 0 "+String:C10($Num_width;"&xml")+" "+String:C10($Num_height;"&xml"))
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "viewBox"; "0 0 "+String:C10($width; "&xml")+" "+String:C10($height; "&xml"))
End if
- //}
- // PreserveAspectRatio {
+ // Mark:-PreserveAspectRatio
Case of
- //______________________________________________________
- : (OK=0)
+ //______________________________________________________
+ : (Not:C34(Bool:C1537(OK)))
+
+ //
- //______________________________________________________
- : ($Lon_preserveAspectRatio=0)
+ //______________________________________________________
+ : ($preserveAspectRatio=0)
- //______________________________________________________
- : ($Lon_preserveAspectRatio=Scaled to fit:K6:2)
+ //______________________________________________________
+ : ($preserveAspectRatio=Scaled to fit:K6:2)
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "preserveAspectRatio";"none")
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "preserveAspectRatio"; "none")
- //______________________________________________________
+ //______________________________________________________
Else
- DOM SET XML ATTRIBUTE:C866($Txt_rootReference;\
- "preserveAspectRatio";"xMidYMid")
+ DOM SET XML ATTRIBUTE:C866($root; \
+ "preserveAspectRatio"; "xMidYMid")
- //______________________________________________________
+ //______________________________________________________
End case
- //}
- // Title {
- If (OK=1)\
- & (Length:C16($Txt_title)>0)
+ // Mark:-Title
+
+ If (Bool:C1537(OK))\
+ && (Length:C16($title)>0)
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_rootReference;"/svg/title")
+ $node:=DOM Create XML element:C865($root; "/svg/title")
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ELEMENT VALUE:C868($Txt_nodeReference;$Txt_title)
+ DOM SET XML ELEMENT VALUE:C868($node; $title)
End if
End if
- //}
- // Desc {
- If (OK=1)\
- & (Length:C16($Txt_description)>0)
+ // Mark:-Desc
+ If (Bool:C1537(OK))\
+ && (Length:C16($description)>0)
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_rootReference;"/svg/desc")
+ $node:=DOM Create XML element:C865($root; "/svg/desc")
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ELEMENT VALUE:C868($Txt_nodeReference;$Txt_description)
+ DOM SET XML ELEMENT VALUE:C868($node; $description)
End if
End if
- //}
- // 4D tag line {
- If (OK=1)\
+ // Mark:-4D tag line
+ If (Bool:C1537(OK))\
& (Structure file:C489#Structure file:C489(*))
- $Txt_metaData:=DOM Create XML element:C865($Txt_rootReference;"metadata";\
- "xmlns";"http://www.4D.com/4DSVG")
+ $Txt_metaData:=DOM Create XML element:C865($root; "metadata"; \
+ "xmlns"; "http://www.4D.com/4DSVG")
- If (OK=1)
+ If (Bool:C1537(OK))
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_metaData;"generator")
+ $node:=DOM Create XML element:C865($Txt_metaData; "generator")
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ELEMENT VALUE:C868($Txt_nodeReference;Storage:C1525.svg.generator)
+ DOM SET XML ELEMENT VALUE:C868($node; Storage:C1525.svg.generator)
- If (OK=1)
+ If (Bool:C1537(OK))
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_metaData;"about")
+ $node:=DOM Create XML element:C865($Txt_metaData; "about")
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ELEMENT VALUE:C868($Txt_nodeReference;"4D SVG is the quintessential vector drawing tool for 4D developers.")
+ DOM SET XML ELEMENT VALUE:C868($node; "4D SVG is the quintessential vector drawing tool for 4D developers.")
- If (OK=1)
+ If (Bool:C1537(OK))
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_metaData;"generation")
+ $node:=DOM Create XML element:C865($Txt_metaData; "generation")
- If (OK=1)
+ If (Bool:C1537(OK))
- XML SET OPTIONS:C1090($Txt_nodeReference;XML date encoding:K45:24;XML UTC:K45:28)
- XML SET OPTIONS:C1090($Txt_nodeReference;XML time encoding:K45:30;XML duration:K45:33)
+ XML SET OPTIONS:C1090($node; XML date encoding:K45:24; XML UTC:K45:28)
+ XML SET OPTIONS:C1090($node; XML time encoding:K45:30; XML duration:K45:33)
- DOM SET XML ATTRIBUTE:C866($Txt_nodeReference;\
- "system";Storage:C1525.svg.system;\
- "date";Current date:C33;\
- "time";Current time:C178)
+ DOM SET XML ATTRIBUTE:C866($node; \
+ "system"; Storage:C1525.svg.system; \
+ "date"; Current date:C33; \
+ "time"; Current time:C178)
End if
End if
@@ -241,50 +192,36 @@ Case of
End if
End if
End if
- //}
- // Defs {
- If (OK=1)
+ // Mark:-Defs
+ If (Bool:C1537(OK))
- $Txt_nodeReference:=DOM Create XML element:C865($Txt_rootReference;"/svg/defs";\
- "id";"4D")
+ $node:=DOM Create XML element:C865($root; "/svg/defs"; \
+ "id"; "4D")
- If (OK=1)
+ If (Bool:C1537(OK))
- DOM SET XML ATTRIBUTE:C866($Txt_nodeReference;\
- "id";"4D")
+ DOM SET XML ATTRIBUTE:C866($node; \
+ "id"; "4D")
End if
End if
- //}
- //______________________________________________________
+ //______________________________________________________
End case
-If (OK=1)
+If (Bool:C1537(OK))
- // Store the reference {
- Use (Storage:C1525.svg)
-
- If (Storage:C1525.svg.docs=Null:C1517)
-
- Storage:C1525.svg.docs:=New shared collection:C1527
-
- End if
-
- Storage:C1525.svg.docs.push($Txt_rootReference)
-
- End use
- //}
+ // Store the reference
+ pushReference($root)
- $0:=$Txt_rootReference
+ return $root
Else
- // Keep the error {
- ASSERT:C1129(Component_errorHandler ("keep"))
- //}
+ // Keep the error
+ ASSERT:C1129(Component_errorHandler("keep"))
End if
-ASSERT:C1129(Component_errorHandler ("deinit"))
\ No newline at end of file
+ASSERT:C1129(Component_errorHandler("deinit"))
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Open_file.4dm b/Project/Sources/Methods/SVG_Open_file.4dm
index a467f30..907fb04 100644
--- a/Project/Sources/Methods/SVG_Open_file.4dm
+++ b/Project/Sources/Methods/SVG_Open_file.4dm
@@ -1,101 +1,73 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Open_file
- // Created 17/07/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- // Open a svg file
- // ----------------------------------------------------
-C_TEXT:C284($0)
-C_TEXT:C284($1)
-C_BOOLEAN:C305($2)
+// ----------------------------------------------------
+// Method : SVG_Open_file
+// Created 17/07/08 by Vincent de Lachaux
+// ----------------------------------------------------
+// Description
+// Open a svg file
+// ----------------------------------------------------
+#DECLARE($pathname : Text; $validate : Boolean) : Text
-C_BOOLEAN:C305($Boo_validate)
-C_LONGINT:C283($Lon_parameters)
-C_TEXT:C284($kTxt_currentMethod;$Txt_path;$Txt_pathDTD;$Txt_rootReference)
+var $CURRENT_METHOD; $DTD; $root : Text
-If (False:C215)
- C_TEXT:C284(SVG_Open_file ;$0)
- C_TEXT:C284(SVG_Open_file ;$1)
- C_BOOLEAN:C305(SVG_Open_file ;$2)
-End if
+Compiler_SVG
-Compiler_SVG
+$CURRENT_METHOD:="SVG_Open_file"
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
-
-If ($Lon_parameters>=1)
-
- $Txt_path:=$1
-
- If ($Lon_parameters>=2)
+Case of
+
+ //______________________________________________________
+ : (Count parameters:C259=0)
+
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Parameters Missing
+
+ //______________________________________________________
+ : (Test path name:C476($pathname)#Is a document:K24:1)
- $Boo_validate:=$2
+ ASSERT:C1129(Component_putError(-43; $CURRENT_METHOD)) // File not found
- End if
-
- If (Test path name:C476($Txt_path)=Is a document:K24:1)
+ //______________________________________________________
+ Else
- $Txt_pathDTD:=Get 4D folder:C485(Current resources folder:K5:16)
- $Txt_pathDTD:=$Txt_pathDTD+"DTD"+Folder separator:K24:12+"svg10.dtd"
+ $DTD:=Get 4D folder:C485(Current resources folder:K5:16)
+ $DTD+="DTD"+Folder separator:K24:12+"svg10.dtd"
- If (Test path name:C476($Txt_pathDTD)=Is a document:K24:1)
+ If (Test path name:C476($DTD)#Is a document:K24:1)
- Component_errorHandler ("init";$kTxt_currentMethod)
+ ASSERT:C1129(Component_putError(8856; $CURRENT_METHOD)) // The DTD file was not found
- If ($Boo_validate)
-
- //parse & validate
- $Txt_rootReference:=DOM Parse XML source:C719($Txt_path;True:C214;$Txt_pathDTD)
-
- Else
-
- $Txt_rootReference:=DOM Parse XML source:C719($Txt_path)
-
- End if
+ return
- If (OK=1)
-
- // Store the reference {
- Use (Storage:C1525.svg)
-
- If (Storage:C1525.svg.docs=Null:C1517)
-
- Storage:C1525.svg.docs:=New shared collection:C1527
-
- End if
-
- Storage:C1525.svg.docs.push($Txt_rootReference)
-
- End use
- //}
-
- $0:=$Txt_rootReference
-
- Else
-
- //Keep the error
- ASSERT:C1129(Component_errorHandler ("keep"))
-
- End if
+ End if
+
+ Component_errorHandler("init"; $CURRENT_METHOD)
+
+ If ($validate)
- ASSERT:C1129(Component_errorHandler ("deinit"))
+ // Parse & validate
+ $root:=DOM Parse XML source:C719($pathname; True:C214; $DTD)
Else
- ASSERT:C1129(Component_putError (8856;$kTxt_currentMethod)) //The DTD file was not found
+ $root:=DOM Parse XML source:C719($pathname)
End if
- Else
+ If (Bool:C1537(OK))
+
+ // Store the reference
+ pushReference($root)
+
+ return $root
+
+ Else
+
+ // Keep the error
+ ASSERT:C1129(Component_errorHandler("keep"))
+
+ End if
- ASSERT:C1129(Component_putError (-43;$kTxt_currentMethod)) //Parameters Missing
+ ASSERT:C1129(Component_errorHandler("deinit"))
- End if
-
-Else
-
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
-
-End if
\ No newline at end of file
+ //______________________________________________________
+End case
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Open_picture.4dm b/Project/Sources/Methods/SVG_Open_picture.4dm
index 6d8d840..e6122b5 100644
--- a/Project/Sources/Methods/SVG_Open_picture.4dm
+++ b/Project/Sources/Methods/SVG_Open_picture.4dm
@@ -1,78 +1,58 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Open_picture
- // Created 20/10/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
-C_TEXT:C284($0)
-C_PICTURE:C286($1)
+// ----------------------------------------------------
+// Method : SVG_Open_picture
+// Created 20/10/08 by Vincent de Lachaux
+// ----------------------------------------------------
+// Description
+//
+// ----------------------------------------------------
+#DECLARE($picture : Picture) : Text
-C_BLOB:C604($Blb_buffer)
-C_LONGINT:C283($Lon_parameters)
-C_PICTURE:C286($Pic_picture)
-C_TEXT:C284($kTxt_currentMethod;$Txt_rootReference)
+var $CURRENT_METHOD; $root : Text
+var $blb : Blob
-If (False:C215)
- C_TEXT:C284(SVG_Open_picture ;$0)
- C_PICTURE:C286(SVG_Open_picture ;$1)
-End if
+Compiler_SVG
-Compiler_SVG
+$CURRENT_METHOD:="SVG_Open_picture"
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
-
-If ($Lon_parameters>=1)
-
- $Pic_picture:=$1
-
- If (Picture size:C356($Pic_picture)>0)
+Case of
+
+ //______________________________________________________
+ : (Count parameters:C259=0)
- Component_errorHandler ("init";$kTxt_currentMethod)
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Parameters Missing
- Component_errorHandler ("ERROR_OFF")
+ //______________________________________________________
+ : (Picture size:C356($picture)>0)
- PICTURE TO BLOB:C692($Pic_picture;$Blb_buffer;".svg")
+ ASSERT:C1129(Component_putError(8857; $CURRENT_METHOD)) // Invalid Value for an Argument
+
+ //______________________________________________________
+ Else
- If (OK=1)
+ Component_errorHandler("init"; $CURRENT_METHOD)
+
+ Try
- $Txt_rootReference:=DOM Parse XML variable:C720($Blb_buffer)
+ PICTURE TO BLOB:C692($picture; $blb; ".svg")
If (OK=1)
- // Store the reference {
- Use (Storage:C1525.svg)
-
- If (Storage:C1525.svg.docs=Null:C1517)
-
- Storage:C1525.svg.docs:=New shared collection:C1527
-
- End if
+ $root:=DOM Parse XML variable:C720($blb)
+
+ If (OK=1)
- Storage:C1525.svg.docs.push($Txt_rootReference)
+ // Store the reference
+ pushReference($root)
- End use
- //}
-
- $0:=$Txt_rootReference
-
+ End if
End if
- End if
-
- Component_errorHandler ("ERROR_ON")
-
- ASSERT:C1129(Component_errorHandler ("deinit"))
+
+ End try
- Else
+ ASSERT:C1129(Component_errorHandler("deinit"))
- ASSERT:C1129(Component_putError (8857;$kTxt_currentMethod)) //Invalid Value for an Argument
+ return $root
- End if
-
-Else
-
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
-
-End if
\ No newline at end of file
+ //______________________________________________________
+End case
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_SAVE_AS_PICTURE.4dm b/Project/Sources/Methods/SVG_SAVE_AS_PICTURE.4dm
index 98b5f6c..076f8e7 100644
--- a/Project/Sources/Methods/SVG_SAVE_AS_PICTURE.4dm
+++ b/Project/Sources/Methods/SVG_SAVE_AS_PICTURE.4dm
@@ -1,143 +1,113 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_SAVE_AS_PICTURE
- // Created 16/03/06
- // Framework SVgg
- // Author : Gérald Czwiklinski
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (16/06/08)
- // 2004 -> v11
- // ----------------------------------------------------
-C_TEXT:C284($1)
-C_TEXT:C284($2)
-C_TEXT:C284($3)
+// ----------------------------------------------------
+// Method : SVG_SAVE_AS_PICTURE
+// Created 16/03/06
+// Framework SVgg
+// Author : Gérald Czwiklinski
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (16/06/08)
+// 2004 -> v11
+// ----------------------------------------------------
+#DECLARE($svgObject : Text; $pathname : Text)
-C_LONGINT:C283($Lon_parameters)
-C_PICTURE:C286($Pic_buffer)
-C_TEXT:C284($Dom_buffer;$Dom_root;$Dom_svgObject;$kTxt_currentMethod;$Txt_buffer;$Txt_codec)
-C_TEXT:C284($Txt_name;$Txt_patern;$Txt_pathname)
+var $codec; $CURRENT_METHOD; $name; $patern; $root; $t : Text
+var $image : Picture
-If (False:C215)
- C_TEXT:C284(SVG_SAVE_AS_PICTURE ;$1)
- C_TEXT:C284(SVG_SAVE_AS_PICTURE ;$2)
- C_TEXT:C284(SVG_SAVE_AS_PICTURE ;$3)
-End if
+Compiler_SVG
-Compiler_SVG
+$CURRENT_METHOD:="SVG_SAVE_AS_PICTURE"
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:="SVG_SAVE_AS_PICTURE" //Nom methode courante
+If (Count parameters:C259<2)
+
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Parameters Missing
+
+ return
+
+End if
-If ($Lon_parameters>=2)
+If (Length:C16($pathname)>0)\
+ && (Position:C15(Folder separator:K24:12; $pathname)=0)
- $Dom_svgObject:=$1
- $Txt_pathname:=$2
+ $pathname:=Get 4D folder:C485(Database folder:K5:14; *)+$pathname
- If (Length:C16($Txt_pathname)>0)
-
- If (Position:C15(Folder separator:K24:12;$Txt_pathname)=0)
-
- $Txt_pathname:=Get 4D folder:C485(Database folder:K5:14;*)+$Txt_pathname
-
- End if
- End if
+End if
+
+// Mark:ACI0093774
+If (Length:C16($codec)=0)
- //#ACI0093774 {
- //$Txt_codec:="image/png"
- //If ($Lon_parameters>=3)
- //$Txt_codec:=$3
- //End if
- If ($Lon_parameters>=3)
-
- $Txt_codec:=$3
+ // Get extension
+ If (Length:C16($pathname)#0)
- Else
+ // Mark:ACI0098413
+ $patern:="(?mi-s)(\\.[.]*)$"
+ ARRAY TEXT:C222($_result; 0x0000)
- //get extension
- If (Length:C16($Txt_pathname)#0)
-
- //ACI0098413
- //change Txt_patern form: "(?mi-s)(\\.[^$]*)$" to "(?mi-s)(\\.[.]*)$"
+ If (Rgx_ExtractText($patern; $pathname; "1"; ->$_result)=0)
- $Txt_patern:="(?mi-s)(\\.[.]*)$"
- ARRAY TEXT:C222($tTxt_result;0x0000)
+ $codec:=$_result{1}
- If (Rgx_ExtractText ($Txt_patern;$Txt_pathname;"1";->$tTxt_result)=0)
-
- $Txt_codec:=$tTxt_result{1}
-
- End if
End if
End if
+End if
+
+$codec:=Length:C16($codec)=0 ? "image/png" : $codec
+
+$root:=DOM Get root XML element:C1053($svgObject)
+DOM GET XML ELEMENT NAME:C730($root; $name)
+
+If ($name#"svg")
- $Txt_codec:=Choose:C955(Length:C16($Txt_codec)=0;"image/png";$Txt_codec)
- //}
+ ASSERT:C1129(Component_putError(8852; $CURRENT_METHOD)) // The reference is not a svg object
- $Dom_root:=DOM Get root XML element:C1053($Dom_svgObject)
- DOM GET XML ELEMENT NAME:C730($Dom_root;$Txt_name)
+ return
- If ($Txt_name="svg")
-
- Component_errorHandler ("init";$kTxt_currentMethod)
+End if
+
+Component_errorHandler("init"; $CURRENT_METHOD)
+
+If (Test path name:C476($pathname)=Is a document:K24:1)
+
+ DELETE DOCUMENT:C159($pathname)
+
+Else
+
+ OK:=1
+
+End if
+
+If (Bool:C1537(OK))
+
+ // Turn_around #ACI0093875
+ // Mark:ACI0093774
+ DOM EXPORT TO VAR:C863($svgObject; $t)
+ $t:=Replace string:C233($t; " xmlns=\"\""; "")
+ $t:=DOM Parse XML variable:C720($t)
+ SVG EXPORT TO PICTURE:C1017($t; $image)
+ DOM CLOSE XML:C722($t)
+
+ If (Bool:C1537(OK))
- If (Test path name:C476($Txt_pathname)=Is a document:K24:1)
-
- DELETE DOCUMENT:C159($Txt_pathname)
-
- Else
-
- OK:=1
-
- End if
+ WRITE PICTURE FILE:C680($pathname; $image; $codec)
- If (OK=1)
+ If (Bool:C1537(OK))
- //Turn_around #ACI0093875
- //#ACI0093774 {
- //SVG EXPORT TO PICTURE($Dom_svgObject;$Pic_buffer)
- DOM EXPORT TO VAR:C863($Dom_svgObject;$Txt_buffer)
- $Txt_buffer:=Replace string:C233($Txt_buffer;" xmlns=\"\"";"")
- $Dom_buffer:=DOM Parse XML variable:C720($Txt_buffer)
- CLEAR VARIABLE:C89($Txt_buffer)
- SVG EXPORT TO PICTURE:C1017($Dom_buffer;$Pic_buffer)
- DOM CLOSE XML:C722($Dom_buffer)
- //}
+ // If (Not(Is nil pointer(<>Ptr_Document)))
+ // <>Ptr_Document->:=DOCUMENT
+ // End if
- If (OK=1)
+ If (Num:C11(Storage:C1525.svg.variableDocument)>0)
- WRITE PICTURE FILE:C680($Txt_pathname;$Pic_buffer;$Txt_codec)
+ CALL WORKER:C1389(1; "fallBack_Not_thread_safe"; New object:C1471(\
+ "document"; DOCUMENT))
- If (OK=1)
-
- // If (Not(Is nil pointer(<>Ptr_Document)))
- //<>Ptr_Document->:=DOCUMENT
- // End if
-
- If (Num:C11(Storage:C1525.svg.variableDocument)>0)
-
- CALL WORKER:C1389(1;"fallBack_Not_thread_safe";New object:C1471(\
- "document";DOCUMENT))
-
- End if
-
- Else
-
- ASSERT:C1129(Component_putError (8858;$kTxt_currentMethod)) //Unknown error
-
- End if
End if
+
+ Else
+
+ ASSERT:C1129(Component_putError(8858; $CURRENT_METHOD)) // Unknown error
+
End if
-
- ASSERT:C1129(Component_errorHandler ("deinit"))
-
- Else
-
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) //The reference is not a svg object
-
End if
-
-Else
-
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
-
-End if
\ No newline at end of file
+End if
+
+ASSERT:C1129(Component_errorHandler("deinit"))
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_SAVE_AS_TEXT.4dm b/Project/Sources/Methods/SVG_SAVE_AS_TEXT.4dm
index 159eb7c..d36c9c4 100644
--- a/Project/Sources/Methods/SVG_SAVE_AS_TEXT.4dm
+++ b/Project/Sources/Methods/SVG_SAVE_AS_TEXT.4dm
@@ -1,95 +1,63 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_SAVE_AS_TEXT
- // Created 16/03/06
- // Framework SVgg
- // Author : Gérald Czwiklinski
- // ----------------------------------------------------
- // Modified by Vincent de Lachaux (16/06/08)
- // 2004 -> v11
- // ----------------------------------------------------
-C_TEXT:C284($1)
-C_TEXT:C284($2)
+// ----------------------------------------------------
+// Method : SVG_SAVE_AS_TEXT
+// Created 16/03/06
+// Framework SVgg
+// Author : Gérald Czwiklinski
+// ----------------------------------------------------
+// Modified by Vincent de Lachaux (16/06/08)
+// 2004 -> v11
+// ----------------------------------------------------
+#DECLARE($svgObject : Text; $pathname : Text)
-C_LONGINT:C283($Lon_parameters)
-C_TEXT:C284($Dom_buffer;$Dom_svgObject;$kTxt_currentMethod;$Txt_buffer;$Txt_pathname)
+var $CURRENT_METHOD; $t : Text
-If (False:C215)
- C_TEXT:C284(SVG_SAVE_AS_TEXT ;$1)
- C_TEXT:C284(SVG_SAVE_AS_TEXT ;$2)
-End if
+Compiler_SVG
-Compiler_SVG
+$CURRENT_METHOD:="SVG_SAVE_AS_TEXT"
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:="SVG_SAVE_AS_TEXT" //Nom methode courante
+If (Count parameters:C259=0)
+
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Parameters Missing
+
+ return
+
+End if
-If ($Lon_parameters>=1)
+If (Asserted:C1132(xml_referenceValid($svgObject); Localized string:C991("error_badReference")))
- $Dom_svgObject:=$1
+ Component_errorHandler("init"; $CURRENT_METHOD)
- If ($Lon_parameters>=2)
+ // Mark:ACI0063507
+ If (Length:C16($pathname)>0)\
+ && (Position:C15(Folder separator:K24:12; $pathname)=0)
- $Txt_pathname:=$2
+ $pathname:=Get 4D folder:C485(Database folder:K5:14; *)+$pathname
End if
- If (Asserted:C1132(xml_referenceValid ($Dom_svgObject);Get localized string:C991("error_badReference")))
-
- Component_errorHandler ("init";$kTxt_currentMethod)
-
- // ___________________ 11.5
- // / ACI0063507
- // || Date 17/11/09
- // ( ) Vincent de Lachaux
- // ___________________
- // Add a test for the path length
- If (Length:C16($Txt_pathname)>0)
-
- // ___________________
-
- If (Position:C15(Folder separator:K24:12;$Txt_pathname)=0)
-
- $Txt_pathname:=Get 4D folder:C485(Database folder:K5:14;*)+$Txt_pathname
-
- End if
- End if
-
- // Turn_around #ACI0093875
- //#ACI0093774 {
- //DOM EXPORT TO FILE($Dom_svgObject;$Txt_pathname)
- DOM EXPORT TO VAR:C863($Dom_svgObject;$Txt_buffer)
- $Txt_buffer:=Replace string:C233($Txt_buffer;" xmlns=\"\"";"")
- $Dom_buffer:=DOM Parse XML variable:C720($Txt_buffer)
- CLEAR VARIABLE:C89($Txt_buffer)
- DOM EXPORT TO FILE:C862($Dom_buffer;$Txt_pathname)
- DOM CLOSE XML:C722($Dom_buffer)
- //}
+ // Turn_around #ACI0093875
+ // Mark:ACI0093774
+ DOM EXPORT TO VAR:C863($svgObject; $t)
+ $t:=Replace string:C233($t; " xmlns=\"\""; "")
+ $t:=DOM Parse XML variable:C720($t)
+ DOM EXPORT TO FILE:C862($t; $pathname)
+ DOM CLOSE XML:C722($t)
+
+ If (Bool:C1537(OK))
- If (OK=1)
+ If (Num:C11(Storage:C1525.svg.variableDocument)>0)
- // If (Not(Is nil pointer(<>Ptr_Document)))
- //<>Ptr_Document->:=DOCUMENT
- // End if
+ CALL WORKER:C1389(1; "fallBack_Not_thread_safe"; New object:C1471(\
+ "document"; DOCUMENT))
- If (Num:C11(Storage:C1525.svg.variableDocument)>0)
-
- CALL WORKER:C1389(1;"fallBack_Not_thread_safe";New object:C1471(\
- "document";DOCUMENT))
-
- End if
End if
-
- ASSERT:C1129(Component_errorHandler ("deinit"))
-
- Else
-
- ASSERT:C1129(Component_putError (8852;$kTxt_currentMethod)) // The reference is not a svg object
-
End if
+ ASSERT:C1129(Component_errorHandler("deinit"))
+
Else
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) // Parameters Missing
+ ASSERT:C1129(Component_putError(8852; $CURRENT_METHOD)) // The reference is not a svg object
End if
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_SET_DEFAULT_ENCODING.4dm b/Project/Sources/Methods/SVG_SET_DEFAULT_ENCODING.4dm
index 8b72584..98d0586 100644
--- a/Project/Sources/Methods/SVG_SET_DEFAULT_ENCODING.4dm
+++ b/Project/Sources/Methods/SVG_SET_DEFAULT_ENCODING.4dm
@@ -1,47 +1,19 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_SET_DEFAULT_ENCODING
- // Created 08/12/09 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
- // Declarations
-C_TEXT:C284($1)
+// ----------------------------------------------------
+// Method : SVG_SET_DEFAULT_ENCODING
+// Created 08/12/09 by Vincent de Lachaux
+// ----------------------------------------------------
+#DECLARE($encoding : Text)
-C_LONGINT:C283($Lon_parameters)
-C_TEXT:C284($kTxt_currentMethod;$Txt_encoding)
+$encoding:=$encoding || "UTF-8"
-If (False:C215)
- C_TEXT:C284(SVG_SET_DEFAULT_ENCODING ;$1)
-End if
-
- // ----------------------------------------------------
- // Initialisations
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
-
- // ----------------------------------------------------
-
-If ($Lon_parameters>=1)
-
- $Txt_encoding:=$1
-
-End if
-
-If (Length:C16($Txt_encoding)=0)
-
- $Txt_encoding:="UTF-8"
-
-End if
-
-ARRAY TEXT:C222($tTxt_characterEncoding;0x0000)
-COLLECTION TO ARRAY:C1562(Storage:C1525.svg["Character encoding"];$tTxt_characterEncoding)
+ARRAY TEXT:C222($tTxt_characterEncoding; 0x0000)
+COLLECTION TO ARRAY:C1562(Storage:C1525.svg["Character encoding"]; $tTxt_characterEncoding)
Case of
- //……………………………………………………………………………
- : (Length:C16($Txt_encoding)=0) // Restaure default
+ //……………………………………………………………………………
+ : (Length:C16($encoding)=0) // Restaure default
Use (Storage:C1525.svg)
@@ -49,21 +21,22 @@ Case of
End use
- //……………………………………………………………………………
- : (Find in array:C230($tTxt_characterEncoding;$Txt_encoding)>0)
+ //……………………………………………………………………………
+ : (Find in array:C230($tTxt_characterEncoding; $encoding)>0)
Use (Storage:C1525.svg)
- Storage:C1525.svg.encoding:=$Txt_encoding
+
+ Storage:C1525.svg.encoding:=$encoding
End use
- //……………………………………………………………………………
+ //……………………………………………………………………………
Else
- ASSERT:C1129(Component_putError (8857;$kTxt_currentMethod)) // Invalid Value for an Argument
+ ASSERT:C1129(Component_putError(8857; Current method name:C684)) // Invalid Value for an Argument
- //……………………………………………………………………………
+ //……………………………………………………………………………
End case
- //#ACI0091143
+// #ACI0091143
CLEAR VARIABLE:C89($tTxt_characterEncoding)
\ No newline at end of file
diff --git a/Project/Sources/Methods/SVG_Validate_file.4dm b/Project/Sources/Methods/SVG_Validate_file.4dm
index 80ae8ea..16e5f59 100644
--- a/Project/Sources/Methods/SVG_Validate_file.4dm
+++ b/Project/Sources/Methods/SVG_Validate_file.4dm
@@ -1,71 +1,46 @@
//%attributes = {"invisible":true,"shared":true,"preemptive":"capable"}
- // ----------------------------------------------------
- // Method : SVG_Validate_file
- // Created 17/07/08 by Vincent de Lachaux
- // ----------------------------------------------------
- // Description
- //
- // ----------------------------------------------------
-C_BOOLEAN:C305($0)
-C_TEXT:C284($1)
+// ----------------------------------------------------
+// Method : SVG_Validate_file
+// Created 17/07/08 by Vincent de Lachaux
+// ----------------------------------------------------
+#DECLARE($pathname : Text) : Boolean
-C_BOOLEAN:C305($Boo_isSVG)
-C_LONGINT:C283($Lon_parameters)
-C_TEXT:C284($Dom_root;$File_pathname;$kTxt_currentMethod;$Txt_buffer)
+var $CURRENT_METHOD; $root; $t : Text
+var $isSVG : Boolean
-If (False:C215)
- C_BOOLEAN:C305(SVG_Validate_file ;$0)
- C_TEXT:C284(SVG_Validate_file ;$1)
-End if
+Compiler_SVG
-Compiler_SVG
+$CURRENT_METHOD:="SVG_Validate_file"
-$Lon_parameters:=Count parameters:C259
-$kTxt_currentMethod:=Current method name:C684
+If (Count parameters:C259=0)
+
+ ASSERT:C1129(Component_putError(8850; $CURRENT_METHOD)) // Parameters Missing
+
+ return
+
+End if
-If ($Lon_parameters>=1)
+If (Test path name:C476($pathname)#Is a document:K24:1)
- $File_pathname:=$1
+ ASSERT:C1129(Component_putError(-43; $CURRENT_METHOD)) // Parameters Missing
- If (Test path name:C476($File_pathname)=Is a document:K24:1)
-
- //#ACI0093752 {
- //$Txt_pathDTD:=Get 4D folder(Current resources folder)+"DTD"+Folder separator+"svg10.dtd"
- //If (Test path name($Txt_pathDTD)=Is a document)
- Component_errorHandler ("init";$kTxt_currentMethod)
-
- //$Txt_rootReference:=DOM Parse XML source($Txt_pathname;True;$Txt_pathDTD)
- $Dom_root:=DOM Parse XML source:C719($File_pathname;True:C214)
-
- $Boo_isSVG:=(OK=1)
-
- If ($Boo_isSVG)
-
- DOM GET XML ELEMENT NAME:C730(DOM Get root XML element:C1053($Dom_root);$Txt_buffer)
-
- $Boo_isSVG:=($Txt_buffer="svg")
-
- DOM CLOSE XML:C722($Dom_root)
-
- End if
-
- ASSERT:C1129(Component_errorHandler ("deinit"))
-
- //Else
- //ASSERT(Component_putError (8856;$kTxt_currentMethod)) //The DTD file was not found
- //End if
- //}
-
- Else
-
- ASSERT:C1129(Component_putError (-43;$kTxt_currentMethod)) //Parameters Missing
-
- End if
+ return
-Else
+End if
+
+Component_errorHandler("init"; $CURRENT_METHOD)
+
+$root:=DOM Parse XML source:C719($pathname; True:C214)
+
+If (Bool:C1537(OK))
- ASSERT:C1129(Component_putError (8850;$kTxt_currentMethod)) //Parameters Missing
+ DOM GET XML ELEMENT NAME:C730(DOM Get root XML element:C1053($root); $t)
+ DOM CLOSE XML:C722($root)
+
+ $isSVG:=($t="svg")
End if
-$0:=$Boo_isSVG //true if the file is a svg
\ No newline at end of file
+ASSERT:C1129(Component_errorHandler("deinit"))
+
+return $isSVG // True if the file is a svg
\ No newline at end of file
diff --git a/Project/Sources/Methods/pushReference.4dm b/Project/Sources/Methods/pushReference.4dm
new file mode 100644
index 0000000..f100c60
--- /dev/null
+++ b/Project/Sources/Methods/pushReference.4dm
@@ -0,0 +1,9 @@
+//%attributes = {"invisible":true,"preemptive":"capable"}
+#DECLARE($ref : Text)
+
+Use (Storage:C1525.svg)
+
+ Storage:C1525.svg.docs:=Storage:C1525.svg.docs || New shared collection:C1527
+ Storage:C1525.svg.docs.push($ref)
+
+End use
\ No newline at end of file
diff --git a/Project/Sources/folders.json b/Project/Sources/folders.json
index a43d514..93c2840 100644
--- a/Project/Sources/folders.json
+++ b/Project/Sources/folders.json
@@ -1,22 +1,80 @@
{
- "_Component": {
+ "(📦 Component)": {},
+ "(00_IN_WORKS)": {},
+ "♻️ LIBRAIRIES": {
"groups": [
- "Interface (THREAD-SAFE)",
- "NOT THREAD SAFE",
- "Private"
+ "Rgx",
+ "xml"
+ ],
+ "methods": [
+ "checkGitBranch"
+ ]
+ },
+ "📦 NOT THREAD SAFE": {
+ "methods": [
+ "COMPILER_Not_Thread_Safe",
+ "fallBack_Not_thread_safe",
+ "SVG_ABOUT",
+ "SVGTool_SET_VIEWER_CALLBACK",
+ "SVGTool_SHOW_IN_VIEWER",
+ "viewer_sources",
+ "xToolBox_tabCreate",
+ "xToolBox_tabHandler"
+ ]
+ },
+ "🧪 unitTests": {
+ "methods": [
+ "test_arc"
+ ]
+ },
+ "🧰 API": {
+ "groups": [
+ "1 - Documents",
+ "2 - Drawing",
+ "3 - Text",
+ "4 - Structure & definition",
+ "5 - Attributes",
+ "6 - Colors & gradients",
+ "7- Filters",
+ "8 - Utilities",
+ "9 - MISCELLANEOUS"
],
"methods": [
"Compiler_SVG",
"Compiler_SVG_Public"
]
},
- "(00_IN_WORKS)": {},
- "00_DEV": {
+ "🚧 Dev": {
"methods": [
"00_test",
"testCallbackMethod"
]
},
+ "🛠️ Tools": {
+ "methods": [
+ "Component_about",
+ "Component_defaultOptions",
+ "Component_errorHandler",
+ "Component_init",
+ "Component_putError",
+ "fontReplaceArial",
+ "PREFERENCES",
+ "pushReference",
+ "setFontStyles",
+ "str_styledText",
+ "SVG_Get_string_width",
+ "svg_relativeURL",
+ "url_decode",
+ "url_encode",
+ "xToolBox_BytesToString",
+ "xToolbox_GetLastItemFromPath",
+ "xToolBox_NO_ERROR",
+ "xToolBox_RELEASE_MENU"
+ ],
+ "forms": [
+ "About"
+ ]
+ },
"1 - Documents": {
"methods": [
"SVG_CLEAR",
@@ -109,7 +167,7 @@
"SVG_Set_title"
]
},
- "4DPop": {
+ "4️⃣ 4DPop": {
"methods": [
"_4DPopSVG",
"about",
@@ -198,64 +256,6 @@
"SVG_Get_ID"
]
},
- "Interface (THREAD-SAFE)": {
- "groups": [
- "1 - Documents",
- "2 - Drawing",
- "3 - Text",
- "4 - Structure & definition",
- "5 - Attributes",
- "6 - Colors & gradients",
- "7- Filters",
- "8 - Utilities",
- "9 - MISCELLANEOUS"
- ]
- },
- "lib": {
- "groups": [
- "Rgx",
- "xml"
- ],
- "methods": [
- "checkGitBranch"
- ]
- },
- "NOT THREAD SAFE": {
- "methods": [
- "COMPILER_Not_Thread_Safe",
- "fallBack_Not_thread_safe",
- "SVG_ABOUT",
- "SVGTool_SET_VIEWER_CALLBACK",
- "SVGTool_SHOW_IN_VIEWER",
- "viewer_sources",
- "xToolBox_tabCreate",
- "xToolBox_tabHandler"
- ]
- },
- "Private": {
- "methods": [
- "Component_about",
- "Component_defaultOptions",
- "Component_errorHandler",
- "Component_init",
- "Component_putError",
- "fontReplaceArial",
- "PREFERENCES",
- "setFontStyles",
- "str_styledText",
- "SVG_Get_string_width",
- "svg_relativeURL",
- "url_decode",
- "url_encode",
- "xToolBox_BytesToString",
- "xToolbox_GetLastItemFromPath",
- "xToolBox_NO_ERROR",
- "xToolBox_RELEASE_MENU"
- ],
- "forms": [
- "About"
- ]
- },
"Rgx": {
"methods": [
"COMPILER_Rgx",
@@ -317,6 +317,7 @@
},
"trash": {
"groups": [
+ "(📦 Component)",
"(00_IN_WORKS)"
]
}