Color OLED module library  v0.5
Library for the WaveShare 0.96-inch color OLED (SSD1331) module
Functions
ssd1331_drawLine.c File Reference
#include "ssd1331.h"

Functions

void ssd1331_drawLine (screen_t *dev, int x0, int y0, int x1, int y1, int color)
 Draws a line on the screen in the specified color. More...
 
void ssd1331_drawFastVLine (screen_t *dev, int x, int y, int w, int color)
 Draws a vertical line on the screen in the specified color. No bounds checking (used by other functions that do the bounds checking first) More...
 
void ssd1331_drawFastHLine (screen_t *dev, int x, int y, int h, int color)
 Draws a horizontal line on the screen in the specified color. No bounds checking (used by other functions that do the bounds checking first) More...
 

Function Documentation

◆ ssd1331_drawFastHLine()

void ssd1331_drawFastHLine ( screen_t *  dev,
int  x,
int  y,
int  h,
int  color 
)

Draws a horizontal line on the screen in the specified color. No bounds checking (used by other functions that do the bounds checking first)

Parameters
devPointer to the display's device structure returned by the initialization function.
xHorizontal coordinate of the line, counted from the left side of the screen.
yVertical coordinate of the line.
hLength of the line in pixels.
colorColor of the line.

◆ ssd1331_drawFastVLine()

void ssd1331_drawFastVLine ( screen_t *  dev,
int  x,
int  y,
int  w,
int  color 
)

Draws a vertical line on the screen in the specified color. No bounds checking (used by other functions that do the bounds checking first)

Parameters
devPointer to the display's device structure returned by the initialization function.
xHorizontal coordinate of the line.
yVertical coordinate of the line, counted down from the top of the screen.
wLength of the line in pixels.
colorColor of the line.

◆ ssd1331_drawLine()

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

Draws a line on the screen 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 pixel, in r5g6b5 format.