VSF Documented
Data Structures | Macros | Enumerations | Functions | Variables
scgui.h File Reference
#include "vsf_cfg.h"
#include "./lvgl.h"

Go to the source code of this file.

Data Structures

struct  SC_tile
 
struct  SC_ARER
 
struct  SC_img_t
 
struct  SC_GUI
 

Macros

#define LCD_SCREEN_WIDTH   1024
 
#define LCD_SCREEN_HEIGHT   768
 
#define SC_PFB_BUF_SIZE   (20 * LCD_SCREEN_WIDTH * 2)
 
#define sc_abs(a)   ((a<0)?(-a):(a))
 
#define SC_MAX(a, b)   (a>b?a:b)
 
#define SC_MIN(a, b)   (a<b?a:b)
 
#define set_pixel_value(dest, offs, src, c)   dest->buf[offs]=alphaBlend(c,dest->buf[offs],src)
 
#define C_MAROON   0x8000
 
#define C_DARK_RED   0x8800
 
#define C_BROWN   0xA145
 
#define C_FIREBRICK   0xB104
 
#define C_CRIMSON   0xD8A7
 
#define C_RED   0xF800
 
#define C_TOMATO   0xFB09
 
#define C_CORAL   0xFBEA
 
#define C_INDIAN_RED   0xCAEB
 
#define C_LIGHT_CORAL   0xEC10
 
#define C_DARK_SALMON   0xE4AF
 
#define C_SALMON   0xF40E
 
#define C_LIGHT_SALMON   0xFD0F
 
#define C_ORANGE_RED   0xFA20
 
#define C_DARK_ORANGE   0xFC60
 
#define C_ORANGE   0xFD20
 
#define C_GOLD   0xFEA0
 
#define C_DARK_GOLDEN_ROD   0xB421
 
#define C_GOLDEN_ROD   0xDD24
 
#define C_PALE_GOLDEN_ROD   0xEF35
 
#define C_DARK_KHAKI   0xBDAD
 
#define C_KHAKI   0xEF31
 
#define C_OLIVE   0x8400
 
#define C_YELLOW   0xFFE0
 
#define C_YELLOW_GREEN   0x9E66
 
#define C_DARK_OLIVE_GREEN   0x5346
 
#define C_OLIVE_DRAB   0x6C64
 
#define C_LAWN_GREEN   0x7FC0
 
#define C_CHART_REUSE   0x7FE0
 
#define C_GREEN_YELLOW   0xAFE6
 
#define C_DARK_GREEN   0x0320
 
#define C_GREEN   0x07E0
 
#define C_FOREST_GREEN   0x2444
 
#define C_LIME   0x07E0
 
#define C_LIME_GREEN   0x3666
 
#define C_LIGHT_GREEN   0x9772
 
#define C_PALE_GREEN   0x97D2
 
#define C_DARK_SEA_GREEN   0x8DD1
 
#define C_MEDIUM_SPRING_GREEN   0x07D3
 
#define C_SPRING_GREEN   0x07EF
 
#define C_SEA_GREEN   0x344B
 
#define C_MEDIUM_AQUA_MARINE   0x6675
 
#define C_MEDIUM_SEA_GREEN   0x3D8E
 
#define C_LIGHT_SEA_GREEN   0x2595
 
#define C_DARK_SLATE_GRAY   0x328A
 
#define C_TEAL   0x0410
 
#define C_DARK_CYAN   0x0451
 
#define C_AQUA   0x07FF
 
#define C_CYAN   0x07FF
 
#define C_LIGHT_CYAN   0xDFFF
 
#define C_DARK_TURQUOISE   0x0679
 
#define C_TURQUOISE   0x46F9
 
#define C_MEDIUM_TURQUOISE   0x4E99
 
#define C_PALE_TURQUOISE   0xAF7D
 
#define C_AQUA_MARINE   0x7FFA
 
#define C_POWDER_BLUE   0xAEFC
 
#define C_CADET_BLUE   0x64F3
 
#define C_STEEL_BLUE   0x4C16
 
#define C_CORN_FLOWER_BLUE   0x64BD
 
#define C_DEEP_SKY_BLUE   0x05FF
 
#define C_DODGER_BLUE   0x249F
 
#define C_LIGHT_BLUE   0xAEBC
 
#define C_SKY_BLUE   0x867D
 
#define C_LIGHT_SKY_BLUE   0x867E
 
#define C_MIDNIGHT_BLUE   0x18CE
 
#define C_NAVY   0x0010
 
#define C_DARK_BLUE   0x0011
 
#define C_MEDIUM_BLUE   0x0019
 
#define C_BLUE   0x001F
 
#define C_ROYAL_BLUE   0x435B
 
#define C_BLUE_VIOLET   0x897B
 
#define C_INDIGO   0x4810
 
#define C_DARK_SLATE_BLUE   0x49F1
 
#define C_SLATE_BLUE   0x6AD9
 
#define C_MEDIUM_SLATE_BLUE   0x7B5D
 
#define C_MEDIUM_PURPLE   0x939B
 
#define C_DARK_MAGENTA   0x8811
 
#define C_DARK_VIOLET   0x901A
 
#define C_DARK_ORCHID   0x9999
 
#define C_MEDIUM_ORCHID   0xBABA
 
#define C_PURPLE   0x8010
 
#define C_THISTLE   0xD5FA
 
#define C_PLUM   0xDD1B
 
#define C_VIOLET   0xEC1D
 
#define C_MAGENTA   0xF81F
 
#define C_ORCHID   0xDB9A
 
#define C_MEDIUM_VIOLET_RED   0xC0B0
 
#define C_PALE_VIOLET_RED   0xDB92
 
#define C_DEEP_PINK   0xF8B2
 
#define C_HOT_PINK   0xFB56
 
#define C_LIGHT_PINK   0xFDB7
 
#define C_PINK   0xFDF9
 
#define C_ANTIQUE_WHITE   0xF75A
 
#define C_BEIGE   0xF7BB
 
#define C_BISQUE   0xFF18
 
#define C_BLANCHED_ALMOND   0xFF59
 
#define C_WHEAT   0xF6F6
 
#define C_CORN_SILK   0xFFBB
 
#define C_LEMON_CHIFFON   0xFFD9
 
#define C_LIGHT_GOLDEN_ROD_YELLOW   0xF7DA
 
#define C_LIGHT_YELLOW   0xFFFB
 
#define C_SADDLE_BROWN   0x8A22
 
#define C_SIENNA   0x9A85
 
#define C_CHOCOLATE   0xD344
 
#define C_PERU   0xCC28
 
#define C_SANDY_BROWN   0xF52C
 
#define C_BURLY_WOOD   0xDDB0
 
#define C_TAN   0xD591
 
#define C_ROSY_BROWN   0xBC71
 
#define C_MOCCASIN   0xFF16
 
#define C_NAVAJO_WHITE   0xFEF5
 
#define C_PEACH_PUFF   0xFED6
 
#define C_MISTY_ROSE   0xFF1B
 
#define C_LAVENDER_BLUSH   0xFF7E
 
#define C_LINEN   0xF77C
 
#define C_OLD_LACE   0xFFBC
 
#define C_PAPAYA_WHIP   0xFF7A
 
#define C_SEA_SHELL   0xFFBD
 
#define C_MINT_CREAM   0xF7FE
 
#define C_SLATE_GRAY   0x7412
 
#define C_LIGHT_SLATE_GRAY   0x7453
 
#define C_LIGHT_STEEL_BLUE   0xAE1B
 
#define C_LAVENDER   0xE73E
 
#define C_FLORAL_WHITE   0xFFDD
 
#define C_ALICE_BLUE   0xEFBF
 
#define C_GHOST_WHITE   0xF7BF
 
#define C_HONEYDEW   0xEFFD
 
#define C_IVORY   0xFFFD
 
#define C_AZURE   0xEFFF
 
#define C_SNOW   0xFFDE
 
#define C_DIM_GRAY   0x6B4D
 
#define C_GRAY   0x8410
 
#define C_DARK_GRAY   0xAD55
 
#define C_SILVER   0xBDF7
 
#define C_LIGHT_GRAY   0xD69A
 
#define C_GAINSBORO   0xDEDB
 
#define C_WHITE_SMOKE   0xF7BE
 
#define C_WHITE   0xFFFF
 
#define C_BLACK   0x0000
 

Enumerations

enum  SC_ALIGN {
  SC_ALIGN_CENTER = 0 ,
  SC_ALIGN_LEFT = 1 << 0 ,
  SC_ALIGN_RIGHT = 1 << 1
}
 

Functions

uint16_t alphaBlend (uint16_t fc, uint16_t bc, uint8_t alpha)
 
void SC_GUI_Init (uint16_t bkc, uint16_t bc, uint16_t fc)
 
void SC_pfb_clip (SC_tile *clip, int xs, int ys, int xe, int ye, uint16_t colour)
 
void SC_pfb_DrawFill (SC_tile *dest, int xs, int ys, int xe, int ye, uint16_t fc)
 
void SC_pfb_DrawFrame (SC_tile *dest, int xs, int ys, int xe, int ye, int width, uint16_t fc)
 
void SC_pfb_Image (SC_tile *dest, int xs, int ys, uint8_t alpha, SC_img_t *src)
 
void SC_pfb_RoundFrame (SC_tile *dest, int xs, int ys, int xe, int ye, int r, int ir, uint16_t ac, uint16_t bc)
 
void SC_pfb_RectFrame (SC_tile *dest, int xs, int ys, int xe, int ye, int width, uint16_t ac, uint16_t bc)
 
int SC_pfb_printf (SC_tile *dest, int x, int y, const char *txt, uint16_t fc, uint16_t bc, lv_font_t *font, int width, int line_space, SC_ALIGN align)
 

Variables

SC_GUIgui
 

Macro Definition Documentation

◆ LCD_SCREEN_WIDTH

#define LCD_SCREEN_WIDTH   1024

◆ LCD_SCREEN_HEIGHT

#define LCD_SCREEN_HEIGHT   768

◆ SC_PFB_BUF_SIZE

#define SC_PFB_BUF_SIZE   (20 * LCD_SCREEN_WIDTH * 2)

◆ sc_abs

#define sc_abs (   a)    ((a<0)?(-a):(a))

◆ SC_MAX

#define SC_MAX (   a,
 
)    (a>b?a:b)

◆ SC_MIN

#define SC_MIN (   a,
 
)    (a<b?a:b)

◆ set_pixel_value

#define set_pixel_value (   dest,
  offs,
  src,
 
)    dest->buf[offs]=alphaBlend(c,dest->buf[offs],src)

fun: pfb»­µã

◆ C_MAROON

#define C_MAROON   0x8000

◆ C_DARK_RED

#define C_DARK_RED   0x8800

◆ C_BROWN

#define C_BROWN   0xA145

◆ C_FIREBRICK

#define C_FIREBRICK   0xB104

◆ C_CRIMSON

#define C_CRIMSON   0xD8A7

◆ C_RED

#define C_RED   0xF800

◆ C_TOMATO

#define C_TOMATO   0xFB09

◆ C_CORAL

#define C_CORAL   0xFBEA

◆ C_INDIAN_RED

#define C_INDIAN_RED   0xCAEB

◆ C_LIGHT_CORAL

#define C_LIGHT_CORAL   0xEC10

◆ C_DARK_SALMON

#define C_DARK_SALMON   0xE4AF

◆ C_SALMON

#define C_SALMON   0xF40E

◆ C_LIGHT_SALMON

#define C_LIGHT_SALMON   0xFD0F

◆ C_ORANGE_RED

#define C_ORANGE_RED   0xFA20

◆ C_DARK_ORANGE

#define C_DARK_ORANGE   0xFC60

◆ C_ORANGE

#define C_ORANGE   0xFD20

◆ C_GOLD

#define C_GOLD   0xFEA0

◆ C_DARK_GOLDEN_ROD

#define C_DARK_GOLDEN_ROD   0xB421

◆ C_GOLDEN_ROD

#define C_GOLDEN_ROD   0xDD24

◆ C_PALE_GOLDEN_ROD

#define C_PALE_GOLDEN_ROD   0xEF35

◆ C_DARK_KHAKI

#define C_DARK_KHAKI   0xBDAD

◆ C_KHAKI

#define C_KHAKI   0xEF31

◆ C_OLIVE

#define C_OLIVE   0x8400

◆ C_YELLOW

#define C_YELLOW   0xFFE0

◆ C_YELLOW_GREEN

#define C_YELLOW_GREEN   0x9E66

◆ C_DARK_OLIVE_GREEN

#define C_DARK_OLIVE_GREEN   0x5346

◆ C_OLIVE_DRAB

#define C_OLIVE_DRAB   0x6C64

◆ C_LAWN_GREEN

#define C_LAWN_GREEN   0x7FC0

◆ C_CHART_REUSE

#define C_CHART_REUSE   0x7FE0

◆ C_GREEN_YELLOW

#define C_GREEN_YELLOW   0xAFE6

◆ C_DARK_GREEN

#define C_DARK_GREEN   0x0320

◆ C_GREEN

#define C_GREEN   0x07E0

◆ C_FOREST_GREEN

#define C_FOREST_GREEN   0x2444

◆ C_LIME

#define C_LIME   0x07E0

◆ C_LIME_GREEN

#define C_LIME_GREEN   0x3666

◆ C_LIGHT_GREEN

#define C_LIGHT_GREEN   0x9772

◆ C_PALE_GREEN

#define C_PALE_GREEN   0x97D2

◆ C_DARK_SEA_GREEN

#define C_DARK_SEA_GREEN   0x8DD1

◆ C_MEDIUM_SPRING_GREEN

#define C_MEDIUM_SPRING_GREEN   0x07D3

◆ C_SPRING_GREEN

#define C_SPRING_GREEN   0x07EF

◆ C_SEA_GREEN

#define C_SEA_GREEN   0x344B

◆ C_MEDIUM_AQUA_MARINE

#define C_MEDIUM_AQUA_MARINE   0x6675

◆ C_MEDIUM_SEA_GREEN

#define C_MEDIUM_SEA_GREEN   0x3D8E

◆ C_LIGHT_SEA_GREEN

#define C_LIGHT_SEA_GREEN   0x2595

◆ C_DARK_SLATE_GRAY

#define C_DARK_SLATE_GRAY   0x328A

◆ C_TEAL

#define C_TEAL   0x0410

◆ C_DARK_CYAN

#define C_DARK_CYAN   0x0451

◆ C_AQUA

#define C_AQUA   0x07FF

◆ C_CYAN

#define C_CYAN   0x07FF

◆ C_LIGHT_CYAN

#define C_LIGHT_CYAN   0xDFFF

◆ C_DARK_TURQUOISE

#define C_DARK_TURQUOISE   0x0679

◆ C_TURQUOISE

#define C_TURQUOISE   0x46F9

◆ C_MEDIUM_TURQUOISE

#define C_MEDIUM_TURQUOISE   0x4E99

◆ C_PALE_TURQUOISE

#define C_PALE_TURQUOISE   0xAF7D

◆ C_AQUA_MARINE

#define C_AQUA_MARINE   0x7FFA

◆ C_POWDER_BLUE

#define C_POWDER_BLUE   0xAEFC

◆ C_CADET_BLUE

#define C_CADET_BLUE   0x64F3

◆ C_STEEL_BLUE

#define C_STEEL_BLUE   0x4C16

◆ C_CORN_FLOWER_BLUE

#define C_CORN_FLOWER_BLUE   0x64BD

◆ C_DEEP_SKY_BLUE

#define C_DEEP_SKY_BLUE   0x05FF

◆ C_DODGER_BLUE

#define C_DODGER_BLUE   0x249F

◆ C_LIGHT_BLUE

#define C_LIGHT_BLUE   0xAEBC

◆ C_SKY_BLUE

#define C_SKY_BLUE   0x867D

◆ C_LIGHT_SKY_BLUE

#define C_LIGHT_SKY_BLUE   0x867E

◆ C_MIDNIGHT_BLUE

#define C_MIDNIGHT_BLUE   0x18CE

◆ C_NAVY

#define C_NAVY   0x0010

◆ C_DARK_BLUE

#define C_DARK_BLUE   0x0011

◆ C_MEDIUM_BLUE

#define C_MEDIUM_BLUE   0x0019

◆ C_BLUE

#define C_BLUE   0x001F

◆ C_ROYAL_BLUE

#define C_ROYAL_BLUE   0x435B

◆ C_BLUE_VIOLET

#define C_BLUE_VIOLET   0x897B

◆ C_INDIGO

#define C_INDIGO   0x4810

◆ C_DARK_SLATE_BLUE

#define C_DARK_SLATE_BLUE   0x49F1

◆ C_SLATE_BLUE

#define C_SLATE_BLUE   0x6AD9

◆ C_MEDIUM_SLATE_BLUE

#define C_MEDIUM_SLATE_BLUE   0x7B5D

◆ C_MEDIUM_PURPLE

#define C_MEDIUM_PURPLE   0x939B

◆ C_DARK_MAGENTA

#define C_DARK_MAGENTA   0x8811

◆ C_DARK_VIOLET

#define C_DARK_VIOLET   0x901A

◆ C_DARK_ORCHID

#define C_DARK_ORCHID   0x9999

◆ C_MEDIUM_ORCHID

#define C_MEDIUM_ORCHID   0xBABA

◆ C_PURPLE

#define C_PURPLE   0x8010

◆ C_THISTLE

#define C_THISTLE   0xD5FA

◆ C_PLUM

#define C_PLUM   0xDD1B

◆ C_VIOLET

#define C_VIOLET   0xEC1D

◆ C_MAGENTA

#define C_MAGENTA   0xF81F

◆ C_ORCHID

#define C_ORCHID   0xDB9A

◆ C_MEDIUM_VIOLET_RED

#define C_MEDIUM_VIOLET_RED   0xC0B0

◆ C_PALE_VIOLET_RED

#define C_PALE_VIOLET_RED   0xDB92

◆ C_DEEP_PINK

#define C_DEEP_PINK   0xF8B2

◆ C_HOT_PINK

#define C_HOT_PINK   0xFB56

◆ C_LIGHT_PINK

#define C_LIGHT_PINK   0xFDB7

◆ C_PINK

#define C_PINK   0xFDF9

◆ C_ANTIQUE_WHITE

#define C_ANTIQUE_WHITE   0xF75A

◆ C_BEIGE

#define C_BEIGE   0xF7BB

◆ C_BISQUE

#define C_BISQUE   0xFF18

◆ C_BLANCHED_ALMOND

#define C_BLANCHED_ALMOND   0xFF59

◆ C_WHEAT

#define C_WHEAT   0xF6F6

◆ C_CORN_SILK

#define C_CORN_SILK   0xFFBB

◆ C_LEMON_CHIFFON

#define C_LEMON_CHIFFON   0xFFD9

◆ C_LIGHT_GOLDEN_ROD_YELLOW

#define C_LIGHT_GOLDEN_ROD_YELLOW   0xF7DA

◆ C_LIGHT_YELLOW

#define C_LIGHT_YELLOW   0xFFFB

◆ C_SADDLE_BROWN

#define C_SADDLE_BROWN   0x8A22

◆ C_SIENNA

#define C_SIENNA   0x9A85

◆ C_CHOCOLATE

#define C_CHOCOLATE   0xD344

◆ C_PERU

#define C_PERU   0xCC28

◆ C_SANDY_BROWN

#define C_SANDY_BROWN   0xF52C

◆ C_BURLY_WOOD

#define C_BURLY_WOOD   0xDDB0

◆ C_TAN

#define C_TAN   0xD591

◆ C_ROSY_BROWN

#define C_ROSY_BROWN   0xBC71

◆ C_MOCCASIN

#define C_MOCCASIN   0xFF16

◆ C_NAVAJO_WHITE

#define C_NAVAJO_WHITE   0xFEF5

◆ C_PEACH_PUFF

#define C_PEACH_PUFF   0xFED6

◆ C_MISTY_ROSE

#define C_MISTY_ROSE   0xFF1B

◆ C_LAVENDER_BLUSH

#define C_LAVENDER_BLUSH   0xFF7E

◆ C_LINEN

#define C_LINEN   0xF77C

◆ C_OLD_LACE

#define C_OLD_LACE   0xFFBC

◆ C_PAPAYA_WHIP

#define C_PAPAYA_WHIP   0xFF7A

◆ C_SEA_SHELL

#define C_SEA_SHELL   0xFFBD

◆ C_MINT_CREAM

#define C_MINT_CREAM   0xF7FE

◆ C_SLATE_GRAY

#define C_SLATE_GRAY   0x7412

◆ C_LIGHT_SLATE_GRAY

#define C_LIGHT_SLATE_GRAY   0x7453

◆ C_LIGHT_STEEL_BLUE

#define C_LIGHT_STEEL_BLUE   0xAE1B

◆ C_LAVENDER

#define C_LAVENDER   0xE73E

◆ C_FLORAL_WHITE

#define C_FLORAL_WHITE   0xFFDD

◆ C_ALICE_BLUE

#define C_ALICE_BLUE   0xEFBF

◆ C_GHOST_WHITE

#define C_GHOST_WHITE   0xF7BF

◆ C_HONEYDEW

#define C_HONEYDEW   0xEFFD

◆ C_IVORY

#define C_IVORY   0xFFFD

◆ C_AZURE

#define C_AZURE   0xEFFF

◆ C_SNOW

#define C_SNOW   0xFFDE

◆ C_DIM_GRAY

#define C_DIM_GRAY   0x6B4D

◆ C_GRAY

#define C_GRAY   0x8410

◆ C_DARK_GRAY

#define C_DARK_GRAY   0xAD55

◆ C_SILVER

#define C_SILVER   0xBDF7

◆ C_LIGHT_GRAY

#define C_LIGHT_GRAY   0xD69A

◆ C_GAINSBORO

#define C_GAINSBORO   0xDEDB

◆ C_WHITE_SMOKE

#define C_WHITE_SMOKE   0xF7BE

◆ C_WHITE

#define C_WHITE   0xFFFF

◆ C_BLACK

#define C_BLACK   0x0000

Enumeration Type Documentation

◆ SC_ALIGN

enum SC_ALIGN
Enumerator
SC_ALIGN_CENTER 
SC_ALIGN_LEFT 
SC_ALIGN_RIGHT 

Function Documentation

◆ alphaBlend()

uint16_t alphaBlend ( uint16_t  fc,
uint16_t  bc,
uint8_t  alpha 
)

◆ SC_GUI_Init()

void SC_GUI_Init ( uint16_t  bkc,
uint16_t  bc,
uint16_t  fc 
)

◆ SC_pfb_clip()

void SC_pfb_clip ( SC_tile clip,
int  xs,
int  ys,
int  xe,
int  ye,
uint16_t  colour 
)

fun: pfb·Ö¸î

◆ SC_pfb_DrawFill()

void SC_pfb_DrawFill ( SC_tile dest,
int  xs,
int  ys,
int  xe,
int  ye,
uint16_t  fc 
)

fun: ¾ØÐÎÌî³ä

◆ SC_pfb_DrawFrame()

void SC_pfb_DrawFrame ( SC_tile dest,
int  xs,
int  ys,
int  xe,
int  ye,
int  width,
uint16_t  fc 
)

fun: ¿Õо¾ØÐÎ

◆ SC_pfb_Image()

void SC_pfb_Image ( SC_tile dest,
int  xs,
int  ys,
uint8_t  alpha,
SC_img_t src 
)

fun: ÏÔʾͼƬ

◆ SC_pfb_RoundFrame()

void SC_pfb_RoundFrame ( SC_tile dest,
int  xs,
int  ys,
int  xe,
int  ye,
int  r,
int  ir,
uint16_t  ac,
uint16_t  bc 
)

fun: pfbÔ²½Ç¾ØÐÎ

◆ SC_pfb_RectFrame()

void SC_pfb_RectFrame ( SC_tile dest,
int  xs,
int  ys,
int  xe,
int  ye,
int  width,
uint16_t  ac,
uint16_t  bc 
)

◆ SC_pfb_printf()

int SC_pfb_printf ( SC_tile dest,
int  x,
int  y,
const char *  txt,
uint16_t  fc,
uint16_t  bc,
lv_font_t font,
int  width,
int  line_space,
SC_ALIGN  align 
)

Variable Documentation

◆ gui

SC_GUI* gui
extern