NIBO Library  2.11
nibo/gfx.h
gehe zur Dokumentation dieser Datei
00001 /*  BSD-License:
00002 
00003 Copyright (c) 2007 by Nils Springob, nicai-systems, Germany
00004 
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without modification,
00008 are permitted provided that the following conditions are met:
00009 
00010   * Redistributions of source code must retain the above copyright notice,
00011     this list of conditions and the following disclaimer.
00012   * Redistributions in binary form must reproduce the above copyright notice,
00013     this list of conditions and the following disclaimer in the documentation
00014     and/or other materials provided with the distribution.
00015   * Neither the name nicai-systems nor the names of its contributors may be
00016     used to endorse or promote products derived from this software without
00017     specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00022 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00023 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00024 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00025 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00027 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00028 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030 
00031 */
00032 
00044 #ifndef NIBO_GFX_H_
00045 #define NIBO_GFX_H_
00046 #if defined(NIBO_USE_GFX) || defined (DOXYGEN)
00047 
00048 #include <stdint.h>
00049 #include <avr/pgmspace.h>
00050 
00051 #ifdef __cplusplus
00052 extern "C" {
00053 #endif
00054 
00055 enum {
00056   GFX_DM_JAM1=0,
00057   GFX_DM_JAM2=1,
00058   GFX_DM_COMP=2,
00059   GFX_DM_JAM1_INV=4,
00060   GFX_DM_JAM2_INV=5,
00061   GFX_DM_COMP_INV=6
00062 };
00063 
00068 void gfx_init();
00069 
00073 uint8_t gfx_get_x();
00074 
00078 uint8_t gfx_get_y();
00079 
00085 void gfx_move(uint8_t x, uint8_t y);
00086 
00091 void gfx_draw_mode(uint8_t mode);
00092 
00097 void gfx_fill(uint8_t val);
00098 
00104 uint8_t gfx_char_width(char ch);
00105 
00111 uint8_t gfx_text_width(const char *txt);
00112 
00118 uint8_t gfx_text_width_P(PGM_P txt);
00119 
00124 void gfx_print_char(char c);
00125 
00130 void gfx_print_text(const char *txt);
00131 
00136 void gfx_print_text_P(PGM_P txt);
00137 
00144 void gfx_draw_xbm(uint8_t width, uint8_t height, uint8_t * data);
00145 
00152 void gfx_draw_xbm_P(uint8_t width, uint8_t height, PGM_P data);
00153 
00158 void gfx_set_proportional(uint8_t prop);
00159 
00164 uint8_t gfx_get_proportional(void);
00165 
00170 void gfx_hline(uint8_t length);
00171 
00176 void gfx_vline(uint8_t length);
00177 
00183 void gfx_box(uint8_t width, uint8_t height);
00184 
00190 void gfx_lineTo(uint8_t x, uint8_t y);
00191 
00196 void gfx_pixel(uint8_t value);
00197 
00201 void gfx_term_clear();
00202 
00208 void gfx_term_goto(uint8_t col, uint8_t row);
00209 
00214 void gfx_term_scroll(uint8_t lines);
00215 
00220 void gfx_term_print(char * text);
00221 
00226 void gfx_term_print_P(PGM_P text);
00227 
00228 
00229 #ifdef __cplusplus
00230 } // extern "C"
00231 #endif
00232 
00233 #endif // NIBO_USE_GFX
00234 #endif // NIBO_GFX_H_
00235 

Erzeugt am Fre Jun 3 2011 15:48:39 für NIBO Library von doxygen 1.7.4-20110426