VECTOR DRAWING
DESCRIPTION
A simple layer to draw simple primitives using the Perl Graphics::Framebuffer similar to BASIC, and resolution independent.
The vector layer uses a virtual 3840 x 2160 screen, regardless of the actual resolution. This means your drawings will always look great no matter what the actual resolution is.
There is also a timing delay to allow for specifically timed displays.
SYNOPSIS
./vector.pl draw.gfb
COMMANDS
- WAIT seconds
-
Waits for the given number of seconds before showing the remaining scripted primitives. Seconds is an integer.
- GRAPHICS_MODE
-
Set the framebuffer to graphics mode. This shuts off all cursor and text printing functions of the terminal. Make sure you restore text mode before exiting the vector layer.
- TEXT_MODE
-
Set the framebuffer back to text mode, after having been previous set to graphics mode with GRAPHICS_MODE
- SPLASH
-
Shows the Graphics::Framebuffer splash screen.
- NORMAL_MODE
-
Sets the drawing mode to normal. This is the default mode and where pixels are completed replaced without regard to previously placed pixels. This is the fastet drawing mode.
- XOR_MODE
-
Sets the drawing mode to xor drawing mode. Pixels will be XORed with what is already on the screen.
- OR_MODE
-
Sets the drawing mode to or drawing mode. Pixels will be ORed with what is already on the screen.
- AND_MODE
-
Sets the drawing mode to and drawing mode. Pixels will be ANDed with what is already on the screen.
- ALPHA_MODE
-
Sets the drawing mode to alpha drawing mode. Pixels will be overlayed on top of what is already on the screen based on the alpha (opacity) value of the FOREGROUND color.
- MASK_MODE
-
Sets the drawing mode to mask drawing mode. Only pixels that are not the BACKGROUND color are drawn to the screen (mostly useful with blitting).
- UNMASK_MODE
-
Sets the drawing mode to unmask drawing mode. Only pixels will be drawn on BACKGROUND colored pixels.
- ADD_MODE
-
Sets the drawing mode to add drawing mode. Pixels will be ADDed with what is already on the screen.
- SUBTRACT_MODE
-
Sets the drawing mode to subtract drawing mode. Pixels will be SUBTRACTEDed from what is already on the screen.
- MULTIPLY_MODE
-
Sets the drawing mode to multiply drawing mode. Pixels will be MULTIPLIEDed with what is already on the screen.
- DIVIDE_MODE
-
Sets the drawing mode to divide drawing mode. Pixels will be DIVIDEDed with what is already on the screen.
- CLS
-
The screen will be cleared with the BACKGROUND color. Also sets the pixel location to 0,0
- ATTRIBUTE_RESET
-
Sets the FOREGROUND color to white, the BACKGROUND color to black, and resets clipping.
- PLOT x, y [, pixel size]
-
Plots a single pixel, in the FOREGROUND color, at the x,y coordinates.
- LINE x, y, xx, yy [, pixel size]
-
Draws a line, in the FOREGROUND color, from x,y to xx,yy.
- ANGLE_LINE x, y, radius, angle [, pixel size]
-
Draws a line, in the FOREGROUND color, starting at point x,y with the length of radius at the given compass angle.
- DRAWTO x, y [, pixel size]
-
Draws a line, in the FOREGROUND color, from the last plotted point to point x,y
- BEZIER points, pixel size, coordinate pairs
-
Draws a bezier curve using the number of points, pixel size, and set number of coordinates (always in x,y pairs).
- ARC x, y, radius, start degrees, end degrees, granularity
- FILLED_PIE x, y, radius, start degrees, end degrees, granularity
- POLY_ARC x, y, radius, start degrees, end degrees, granularity
- ELLIPSE x, y, xradius, yradius [, filled] [, pixel size]
- CIRCLE x, y, radius [, filled] [, pixel size]
- POLYGON coordinate pairs
- FILLED_POLYGON coordinate pairs
- BOX x, y, xx, yy [, filled] [, corner radius] [, pixel size]
- RBOX x, y, width, height [, filled] [, corner radius] [, pixel size]
- FOREGROUND red, green, blue [, alpha]
- BACKGROUND red, green, blue [, alpha]
- FILL x, y
- REPLACE_COLOR old red, old green, old blue, new red, new green, new blue
- BLIT_MOVE x, y, width, height, new x, new y
- BLIT_COPY x, y, width, height, new x, new y
- PERL
- SOFTWARE
- CLIP_RESET
- CLIP_SET x, y, xx, yy
- CLIP_RSET x, y, width, height
- VSYNC