Proposed badgecode2: Difference between revisions
From Convention Master Documentation
(Created page with "badgecode2 General Design Philosphy badgecode2 should overcome the limitations with the existing design, allowing us to match combinations of charcteristics to swap out draw...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
badgecode2 | == badgecode2 == | ||
General Design Philosphy | === General Design Philosphy === | ||
badgecode2 should overcome the limitations with the existing design, allowing us to match combinations of charcteristics to swap out drawing commands. | badgecode2 should overcome the limitations with the existing design, allowing us to match combinations of charcteristics to swap out drawing commands. | ||
Line 11: | Line 11: | ||
badgecode2 when possible should match the syntax and function names of badgecode, alternatively the following system is proposed. | badgecode2 when possible should match the syntax and function names of badgecode, alternatively the following system is proposed. | ||
==== Complex calls: ==== | |||
generally x and y should be replaced with top= and left= a second x and y string would be replaced with bottom= and right= | generally x and y should be replaced with top= and left= a second x and y string would be replaced with bottom= and right= | ||
function_name(top=1,left=1, optional arguments) | <nowiki>function_name(top=1,left=1, optional arguments)</nowiki> | ||
A function like draw_box and draw_line would also have bottom= and right= as required args, draw_image optionally would use this as well. | |||
=== Simple Calls: === | |||
<nowiki>function_name(value,value,value,value)</nowiki> | |||
This is used for simple functions that only need to take color values (or other number values) and apply to the whole image. | |||
Language Features | === Language Features === | ||
Logic Features | * Logic Features | ||
full if/elseif/else support | * full if/elseif/else support | ||
Switch support | * Switch support | ||
Comparison and/or Logical Operators (likely just one of these is enough) | * Comparison and/or Logical Operators (likely just one of these is enough) | ||
=== Convivence Features === | |||
Local Variables - useful when bringing templated badge into a system. All UDF's can be patched to a named variable in the badgecode. | * Local Variables - useful when bringing templated badge into a system. All UDF's can be patched to a named variable in the badgecode. | ||
Wishlist | === Wishlist Advanced Features === | ||
php-gd passthru - a special function call to allow us to call any function within php-gd. | * php-gd passthru - a special function call to allow us to call any function within php-gd. | ||
Drawing, Text and Image Options | === Drawing, Text and Image Options === | ||
Everything that badgecode currently supports. | * Everything that badgecode currently supports. |
Latest revision as of 22:25, 26 July 2021
badgecode2
General Design Philosphy
badgecode2 should overcome the limitations with the existing design, allowing us to match combinations of charcteristics to swap out drawing commands.
badgecode2 should rely on sysvars over special logic functions to match things in the system, using an extensive system of flags and strings to create badges.
badgecode2 should reduce the number of potential ways to address the image space, currently we support.. percentages, inches, cm, mm, points, and pixels - it is suggested that this be reduced to percentages and pixels for images, and pixels and points for fonts, with the default mode for fonts being assumed to be in points.
badgecode2 when possible should match the syntax and function names of badgecode, alternatively the following system is proposed.
Complex calls:
generally x and y should be replaced with top= and left= a second x and y string would be replaced with bottom= and right=
function_name(top=1,left=1, optional arguments)
A function like draw_box and draw_line would also have bottom= and right= as required args, draw_image optionally would use this as well.
Simple Calls:
function_name(value,value,value,value)
This is used for simple functions that only need to take color values (or other number values) and apply to the whole image.
Language Features
- Logic Features
- full if/elseif/else support
- Switch support
- Comparison and/or Logical Operators (likely just one of these is enough)
Convivence Features
- Local Variables - useful when bringing templated badge into a system. All UDF's can be patched to a named variable in the badgecode.
Wishlist Advanced Features
- php-gd passthru - a special function call to allow us to call any function within php-gd.
Drawing, Text and Image Options
- Everything that badgecode currently supports.