Display Simple Graphics library  v0.5
Library containing shape, text, and bitmap drawing functions called by various display drivers
Functions
drawLine.c File Reference
#include "simplegfx.h"

Functions

int ComputeOutCode (int x, int y, int w, int h)
 
void drawLine (screen_t *dev, int x0, int y0, int x1, int y1, int c)
 Draws a line in the specified color. More...
 
void drawFastHLine (screen_t *dev, int x, int y, int w, int color)
 Draws a horizontal line in the specified color. More...
 
void drawFastVLine (screen_t *dev, int x, int y, int h, int color)
 Draws a vertical line in the specified color. More...
 

Function Documentation

◆ ComputeOutCode()

int ComputeOutCode ( int  x,
int  y,
int  w,
int  h 
)

◆ drawFastHLine()

void drawFastHLine ( screen_t dev,
int  x,
int  y,
int  w,
int  color 
)

Draws a horizontal line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the line, counted from the left side of the screen.
yStarting vertical coordinate of the line, counted down from the top of the screen.
wLength of the line.
colorColor of the line, in the format native to the display.

◆ drawFastVLine()

void drawFastVLine ( screen_t dev,
int  x,
int  y,
int  h,
int  color 
)

Draws a vertical line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
xStarting horizontal coordinate of the line, counted from the left side of the screen.
yStarting vertical coordinate of the line, counted down from the top of the screen.
hLength of the line.
colorColor of the line, in the format native to the display.

◆ drawLine()

void drawLine ( screen_t dev,
int  x0,
int  y0,
int  x1,
int  y1,
int  color 
)

Draws a line in the specified color.

Parameters
devPointer to the display's device structure returned by the initialization function.
x0Starting horizontal coordinate of the line, counted from the left side of the screen.
y0Starting vertical coordinate of the line, counted down from the top of the screen.
x1Ending horizontal coordinate of the line.
y1Ending vertical coordinate of the line.
colorColor of the shape, in the format native to the display.