Actions

Proposed badgecode2

From Convention Master Documentation

Revision as of 22:14, 26 July 2021 by Aloha (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

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