ZestCode
 
Loading...
Searching...
No Matches
screen.h File Reference
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include "pros/colors.h"

Go to the source code of this file.

Classes

struct  screen_touch_status_s
 

Typedefs

typedef struct screen_touch_status_s screen_touch_status_s_t
 
typedef void(* touch_event_cb_fn_t) ()
 

Enumerations

enum  text_format_e_t {
  E_TEXT_SMALL = 0 , E_TEXT_MEDIUM , E_TEXT_LARGE , E_TEXT_MEDIUM_CENTER ,
  E_TEXT_LARGE_CENTER
}
 
enum  last_touch_e_t { E_TOUCH_RELEASED = 0 , E_TOUCH_PRESSED , E_TOUCH_HELD , E_TOUCH_ERROR }
 

Functions

Screen Graphical Display Functions

These functions allow programmers to display shapes on the v5 screen

uint32_t screen_set_pen (uint32_t color)
 
uint32_t screen_set_eraser (uint32_t color)
 
uint32_t screen_get_pen (void)
 
uint32_t screen_get_eraser (void)
 
uint32_t screen_erase (void)
 
uint32_t screen_scroll (int16_t start_line, int16_t lines)
 
uint32_t screen_scroll_area (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t lines)
 
uint32_t screen_copy_area (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint32_t *buf, int32_t stride)
 
uint32_t screen_draw_pixel (int16_t x, int16_t y)
 
uint32_t screen_erase_pixel (int16_t x, int16_t y)
 
uint32_t screen_draw_line (int16_t x0, int16_t y0, int16_t x1, int16_t y1)
 
uint32_t screen_erase_line (int16_t x0, int16_t y0, int16_t x1, int16_t y1)
 
uint32_t screen_draw_rect (int16_t x0, int16_t y0, int16_t x1, int16_t y1)
 
uint32_t screen_erase_rect (int16_t x0, int16_t y0, int16_t x1, int16_t y1)
 
uint32_t screen_fill_rect (int16_t x0, int16_t y0, int16_t x1, int16_t y1)
 
uint32_t screen_draw_circle (int16_t x, int16_t y, int16_t radius)
 
uint32_t screen_erase_circle (int16_t x, int16_t y, int16_t radius)
 
uint32_t screen_fill_circle (int16_t x, int16_t y, int16_t radius)
 
Screen Text Display Functions

These functions allow programmers to display text on the v5 screen

uint32_t screen_print (text_format_e_t txt_fmt, const int16_t line, const char *text,...)
 
uint32_t screen_print_at (text_format_e_t txt_fmt, const int16_t x, const int16_t y, const char *text,...)
 
uint32_t screen_vprintf (text_format_e_t txt_fmt, const int16_t line, const char *text, va_list args)
 
uint32_t screen_vprintf_at (text_format_e_t txt_fmt, const int16_t x, const int16_t y, const char *text, va_list args)
 
Screen Touch Functions

These functions allow programmers to access information about screen touches

screen_touch_status_s_t screen_touch_status (void)
 
uint32_t screen_touch_callback (touch_event_cb_fn_t cb, last_touch_e_t event_type)
 

Detailed Description

Brain screen display and touch functions.

Contains user calls to the v5 screen for touching and displaying graphics.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.