slow day. so may as well share another victory
-
I got it working. My SVG builder is now producing shapes and such. What a beautiful thing.
svg_doc_builder builder;
svg_shape_info si;
si.stroke.color = color>::white;
si.fill.type = svg_paint_type::color;
si.fill.color = color>::red;
gfx_result res = builder.add_ellipse({20,20},{10,10},si);
if(res!=gfx_result::success) {
printf("Error: %d\r\n",(int)res);
return 1;
}
svg_doc doc;
builder.to_doc({40,40}, &doc);First and second attempts below (rendered to ascii)
,++ +O@$#, ,%O+~~1@= ~@!~~~~~;%O~ ,@+~~~~~~~~=O!. %!~~~~~~~~~~~1O~ +$~~~~~~~~~~~~~=@! O+~~~~~~~~~~~~~~;%1 ,O~~~~~~~~~~~~~~~~~$x ;%~~~~~~~~~~~~~~~~~;@. +1~~~~~~~~~~~~~~~~~~%; =1~~~~~~~~~~~~~~~~~~1= ;%~~~~~~~~~~~~~~~~~~%; ,O~~~~~~~~~~~~~~~~~~O, O+~~~~~~~~~~~~~~~~+O +$~~~~~~~~~~~~~~~~$+ %!~~~~~~~~~~~~~~!% ,@+~~~~~~~~~~~~+@, ~@!~~~~~~~~~~!@~ ,%O+~~~~~~+O%, +O@%%%%@O+ ,++++, ,++++, +O@%%%%@O+ ,%O+~~~~~~+O%, ~@!~~~~~~~~~~!@~ ,@+~~~~~~~~~~~~+@, %!~~~~~~~~~~~~~~!% +$~~~~~~~~~~~~~~~~O+ O+~~~~~~~~~~~~~~~~+O ,O~~~~~~~~~~~~~~~~~~O, ;%~~~~~~~~~~~~~~~~~~%; +1~~~~~~~~~~~~~~~~~~1+ =1~~~~~~~~~~~~~~~~~~1= ;%~~~~~~~~~~~~~~~~~~%; ,O~~~~~~~~~~~~~~~~~~O, O+~~~~~~~~~~~~~~~~+O +$~~~~~~~~~~~~~~~~$+ %!~~~~~~~~~~~~~~!% ,@+~~~~~~~~~~~~+@, ~@!~~~~~~~~~~!@~ ,%O+~~~~~~+O%, +O@%%%%@O+ ,++++,
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
I got it working. My SVG builder is now producing shapes and such. What a beautiful thing.
svg_doc_builder builder;
svg_shape_info si;
si.stroke.color = color>::white;
si.fill.type = svg_paint_type::color;
si.fill.color = color>::red;
gfx_result res = builder.add_ellipse({20,20},{10,10},si);
if(res!=gfx_result::success) {
printf("Error: %d\r\n",(int)res);
return 1;
}
svg_doc doc;
builder.to_doc({40,40}, &doc);First and second attempts below (rendered to ascii)
,++ +O@$#, ,%O+~~1@= ~@!~~~~~;%O~ ,@+~~~~~~~~=O!. %!~~~~~~~~~~~1O~ +$~~~~~~~~~~~~~=@! O+~~~~~~~~~~~~~~;%1 ,O~~~~~~~~~~~~~~~~~$x ;%~~~~~~~~~~~~~~~~~;@. +1~~~~~~~~~~~~~~~~~~%; =1~~~~~~~~~~~~~~~~~~1= ;%~~~~~~~~~~~~~~~~~~%; ,O~~~~~~~~~~~~~~~~~~O, O+~~~~~~~~~~~~~~~~+O +$~~~~~~~~~~~~~~~~$+ %!~~~~~~~~~~~~~~!% ,@+~~~~~~~~~~~~+@, ~@!~~~~~~~~~~!@~ ,%O+~~~~~~+O%, +O@%%%%@O+ ,++++, ,++++, +O@%%%%@O+ ,%O+~~~~~~+O%, ~@!~~~~~~~~~~!@~ ,@+~~~~~~~~~~~~+@, %!~~~~~~~~~~~~~~!% +$~~~~~~~~~~~~~~~~O+ O+~~~~~~~~~~~~~~~~+O ,O~~~~~~~~~~~~~~~~~~O, ;%~~~~~~~~~~~~~~~~~~%; +1~~~~~~~~~~~~~~~~~~1+ =1~~~~~~~~~~~~~~~~~~1= ;%~~~~~~~~~~~~~~~~~~%; ,O~~~~~~~~~~~~~~~~~~O, O+~~~~~~~~~~~~~~~~+O +$~~~~~~~~~~~~~~~~$+ %!~~~~~~~~~~~~~~!% ,@+~~~~~~~~~~~~+@, ~@!~~~~~~~~~~!@~ ,%O+~~~~~~+O%, +O@%%%%@O+ ,++++,
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
I really want to see you interface one of your little IOT widgets to an old-school Centronics line printer, or even better, a KSR33 teletype!
Software Zen:
delete this;