Actions

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
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 17: Line 17:
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)
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)


function name (value,value,value,value) (this is used for simple functions that only need to take color values and apply to the whole image.
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
=== 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)


Convience Features
=== 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 Advaned Features
=== 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.

Revision as of 23:23, 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.

for 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)

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.