FemtoIDE Java API  v0.0.18b
femto.mode.ScreenMode Class Reference
Inheritance diagram for femto.mode.ScreenMode:
femto.mode.Direct femto.mode.HiRes16Color

Public Member Functions

float fps ()
 Returns an int with the average framerate. More...
 
void flush ()
 Copies the framebuffer data to the LCD.
 
void setTextPosition (float x, float y)
 Sets the coordinates for text drawing.
 
void setTextColor (int color)
 Sets the color used for text drawing.
 
abstract uint width ()
 Returns the width of the screen in pixels (varies per screen mode).
 
abstract uint height ()
 Returns the height of the screen in pixels (varies per screen mode).
 
void setPixel (float x, float y, int color, boolean isStatic)
 Plots a pixel in the framebuffer. Does not take camera offset into consideration.
 
void setPixel (uint x, uint y, int color)
 
void drawHLine (float x, float y, float w, int color, boolean isStatic)
 
void drawHLine (int x, int y, int w, int color)
 
void drawVLine (float x, float y, float h, int color, boolean isStatic)
 
void drawVLine (int x, int y, int h, int color)
 
void drawRect (float x, float y, float w, float h, int color, boolean isStatic)
 
void drawRect (int x, int y, int w, int h, int color)
 
void fillRect (float x, float y, float w, float h, int color, boolean isStatic)
 
void fillRect (int x, int y, int w, int h, int color)
 
void drawLine (float x0, float y0, float x1, float y1, int color, boolean isStatic)
 
void drawLine (int x0, int y0, int x1, int y1, int color)
 
void fillTriangle (int x0, int y0, int x1, int y1, int x2, int y2, byte col)
 Draws a filled triangle.
 
int textHeight ()
 
void println (String s)
 
void print (String s)
 
void print (uint v)
 
void print (int v)
 
void print (float v)
 
void putchar (char index)
 

Public Attributes

pointer font
 The font used by this screen mode.
 
int textLeftLimit
 
float textX
 
int textColor
 
float cameraX = 0.0f
 
int lastFrameTime
 

Static Public Attributes

static int frameTime = 64000
 

Member Function Documentation

◆ fps()

float femto.mode.ScreenMode.fps ( )

Returns an int with the average framerate.

Note
The returned value is inaccurate for the first 64 frames.

The documentation for this class was generated from the following file: