Ngo Kien / Graphics

Dependents:   SignalProcessLab DigitalSignalAlgorithm_Lab DigitalSignal_Lab

Embed: (wiki syntax)

« Back to documentation index

RK043FN48H Class Reference

RK043FN48H Class Reference

DISCO_F746NG display. More...

#include <RK043FN48H.h>

Inherits Display.

Public Member Functions

void Clear ()
 Clear the active layer using background color.
void Clear (uint32_t color)
 Clear the active layer using given color.
void ClearLayer (Layer layer, uint32_t color)
 Clear selected layer using given color.
void SetBackgroundColor (uint32_t color)
 Set background color for active layer.
void SetForegroundColor (uint32_t color)
 Set foreground color for active layer.
virtual void SetDrawColor (uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
 Sets the color of the draw.
virtual uint32_t GetDrawColor ()
 Returns the color to draw on selected layer.
virtual void DrawPoint (int posX, int posY, uint32_t colorMask)
 Draws the point.
virtual uint16_t DisplayWidth ()
 Returns screen width.
virtual uint16_t DisplayHeight ()
 Returns screen height.
void DrawHLine (uint16_t Xpos, uint16_t Ypos, uint16_t Length)
 Draws an horizontal line.
void DrawVLine (uint16_t Xpos, uint16_t Ypos, uint16_t Length)
 Draws a vertical line.
void DrawLine (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 Draws an uni-line (between two points);.
void DrawRect (uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
 Draws a rectangle.
void DrawCircle (uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
 Draws a circle.
void DrawPolygon (pPoint Points, uint16_t PointCount)
 Draws an poly-line (between many points);.
void DrawEllipse (int Xpos, int Ypos, int XRadius, int YRadius)
 Draws an ellipse on LCD.
void DrawPixel (uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code)
 Draws a pixel on LCD.
void DrawBitmap (uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
 Draws a bitmap picture loaded in the internal Flash in ARGB888 format (32 bits per pixel);.
void FillRect (uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
 Draws a full rectangle.
void FillCircle (uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
 Draws a full circle.
void FillPolygon (pPoint Points, uint16_t PointCount)
 Draws a full poly-line (between many points);.
void FillEllipse (int Xpos, int Ypos, int XRadius, int YRadius)
 Draws a full ellipse.
void SetTextColor (uint32_t Color)
 Sets the LCD text color.
uint32_t GetTextColor (void)
 Gets the LCD text color.
void SetBackColor (uint32_t Color)
 Sets the LCD background color.
uint32_t GetBackColor (void)
 Gets the LCD background color.
void SetFont (sFONT *fonts)
 Sets the LCD text font.
sFONT * GetFont (void)
 Gets the LCD text font.
uint32_t ReadPixel (uint16_t Xpos, uint16_t Ypos)
 Reads an LCD pixel.
void ClearStringLine (uint32_t Line)
 Clears the selected line.
void DisplayChar (uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
 Displays one character.
void DisplayStringAt (uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode)
 Displays characters on the LCD.
void DisplayStringAtLine (uint16_t Line, uint8_t *ptr)
 Displays a maximum of 60 characters on the LCD.
virtual void DrawLine (int startX, int startY, int endX, int endY)
 Draws the line.
virtual void DrawCircle (int posX, int posY, uint16_t radius)
 Draws the circle.
virtual void DrawRectangle (int startX, int startY, int endX, int endY)
 Draws the rectangle.
virtual void DrawTriangle (int x1, int y1, int x2, int y2, int x3, int y3)
 Draws the triangle.

Detailed Description

DISCO_F746NG display.

Definition at line 27 of file RK043FN48H.h.


Member Function Documentation

void Clear ( void   )

Clear the active layer using background color.

Return values:
None

Definition at line 64 of file RK043FN48H.cpp.

void Clear ( uint32_t  color )

Clear the active layer using given color.

Return values:
None

Definition at line 70 of file RK043FN48H.cpp.

void ClearLayer ( Layer  layer,
uint32_t  color 
)

Clear selected layer using given color.

Return values:
None

Definition at line 76 of file RK043FN48H.cpp.

void ClearStringLine ( uint32_t  Line )

Clears the selected line.

Parameters:
Line,:Line to be cleared
Return values:
None

Definition at line 304 of file RK043FN48H.cpp.

void DisplayChar ( uint16_t  Xpos,
uint16_t  Ypos,
uint8_t  Ascii 
)

Displays one character.

Parameters:
Xpos,:Start column address
Ypos,:Line where to display the character shape.
Ascii,:Character ascii code This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E
Return values:
None

Definition at line 319 of file RK043FN48H.cpp.

uint16_t DisplayHeight (  ) [virtual]

Returns screen height.

Returns:

Implements DisplayBase.

Definition at line 165 of file RK043FN48H.cpp.

void DisplayStringAt ( uint16_t  Xpos,
uint16_t  Ypos,
uint8_t *  Text,
Text_AlignModeTypdef  Mode 
)

Displays characters on the LCD.

Parameters:
Xpos,:X position (in pixel);
Ypos,:Y position (in pixel);
Text,:Pointer to string to display on LCD
Mode,:Display mode This parameter can be one of the following values:

  • CENTER_MODE
  • RIGHT_MODE
  • LEFT_MODE
Return values:
None

Definition at line 314 of file RK043FN48H.cpp.

void DisplayStringAtLine ( uint16_t  Line,
uint8_t *  ptr 
)

Displays a maximum of 60 characters on the LCD.

Parameters:
Line,:Line where to display the character shape
ptr,:Pointer to string to display on LCD
Return values:
None

Definition at line 309 of file RK043FN48H.cpp.

uint16_t DisplayWidth (  ) [virtual]

Returns screen width.

Returns:

Implements DisplayBase.

Definition at line 159 of file RK043FN48H.cpp.

void DrawBitmap ( uint32_t  Xpos,
uint32_t  Ypos,
uint8_t *  pbmp 
)

Draws a bitmap picture loaded in the internal Flash in ARGB888 format (32 bits per pixel);.

Parameters:
Xpos,:Bmp X position in the LCD
Ypos,:Bmp Y position in the LCD
pbmp,:Pointer to Bmp picture address in the internal Flash
Return values:
None

Definition at line 238 of file RK043FN48H.cpp.

void DrawCircle ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Radius 
)

Draws a circle.

Parameters:
Xpos,:X position
Ypos,:Y position
Radius,:Circle radius
Return values:
None

Definition at line 223 of file RK043FN48H.cpp.

void DrawCircle ( int  posX,
int  posY,
uint16_t  radius 
) [virtual, inherited]

Draws the circle.

Parameters:
posXThe position x.
posYThe position y.
radiusThe radius.

Definition at line 59 of file GeometricPrim.cpp.

void DrawEllipse ( int  Xpos,
int  Ypos,
int  XRadius,
int  YRadius 
)

Draws an ellipse on LCD.

Parameters:
Xpos,:X position
Ypos,:Y position
XRadius,:Ellipse X radius
YRadius,:Ellipse Y radius
Return values:
None

Definition at line 233 of file RK043FN48H.cpp.

void DrawHLine ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Length 
)

Draws an horizontal line.

Parameters:
Xpos,:X position
Ypos,:Y position
Length,:Line length
Return values:
None

Definition at line 203 of file RK043FN48H.cpp.

void DrawLine ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Draws an uni-line (between two points);.

Parameters:
x1,:Point 1 X position
y1,:Point 1 Y position
x2,:Point 2 X position
y2,:Point 2 Y position
Return values:
None

Definition at line 213 of file RK043FN48H.cpp.

void DrawLine ( int  startX,
int  startY,
int  endX,
int  endY 
) [virtual, inherited]

Draws the line.

Parameters:
startXThe start x.
startYThe start y.
endXThe end x.
endYThe end y.

Definition at line 20 of file GeometricPrim.cpp.

void DrawPixel ( uint16_t  Xpos,
uint16_t  Ypos,
uint32_t  RGB_Code 
)

Draws a pixel on LCD.

Parameters:
Xpos,:X position
Ypos,:Y position
RGB_Code,:Pixel color in ARGB mode (8-8-8-8);
Return values:
None

Definition at line 298 of file RK043FN48H.cpp.

void DrawPoint ( int  posX,
int  posY,
uint32_t  colorMask 
) [virtual]

Draws the point.

Parameters:
posXThe position x.
posYThe position y.
colorMaskThe color mask.

Definition at line 113 of file RK043FN48H.cpp.

void DrawPolygon ( pPoint  Points,
uint16_t  PointCount 
)

Draws an poly-line (between many points);.

Parameters:
Points,:Pointer to the points array
PointCount,:Number of points
Return values:
None

Definition at line 228 of file RK043FN48H.cpp.

void DrawRect ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Width,
uint16_t  Height 
)

Draws a rectangle.

Parameters:
Xpos,:X position
Ypos,:Y position
Width,:Rectangle width
Height,:Rectangle height
Return values:
None

Definition at line 218 of file RK043FN48H.cpp.

void DrawRectangle ( int  startX,
int  startY,
int  endX,
int  endY 
) [virtual, inherited]

Draws the rectangle.

Parameters:
startXThe start x.
startYThe start y.
endXThe end x.
endYThe end y.

Definition at line 103 of file GeometricPrim.cpp.

void DrawTriangle ( int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
) [virtual, inherited]

Draws the triangle.

Parameters:
x1The x1.
y1The y1.
x2The x2.
y2The y2.
x3The x3.
y3The y3.

Definition at line 112 of file GeometricPrim.cpp.

void DrawVLine ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Length 
)

Draws a vertical line.

Parameters:
Xpos,:X position
Ypos,:Y position
Length,:Line length
Return values:
None

Definition at line 208 of file RK043FN48H.cpp.

void FillCircle ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Radius 
)

Draws a full circle.

Parameters:
Xpos,:X position
Ypos,:Y position
Radius,:Circle radius
Return values:
None

Definition at line 248 of file RK043FN48H.cpp.

void FillEllipse ( int  Xpos,
int  Ypos,
int  XRadius,
int  YRadius 
)

Draws a full ellipse.

Parameters:
Xpos,:X position
Ypos,:Y position
XRadius,:Ellipse X radius
YRadius,:Ellipse Y radius
Return values:
None

Definition at line 258 of file RK043FN48H.cpp.

void FillPolygon ( pPoint  Points,
uint16_t  PointCount 
)

Draws a full poly-line (between many points);.

Parameters:
Points,:Pointer to the points array
PointCount,:Number of points
Return values:
None

Definition at line 253 of file RK043FN48H.cpp.

void FillRect ( uint16_t  Xpos,
uint16_t  Ypos,
uint16_t  Width,
uint16_t  Height 
)

Draws a full rectangle.

Parameters:
Xpos,:X position
Ypos,:Y position
Width,:Rectangle width
Height,:Rectangle height
Return values:
None

Definition at line 243 of file RK043FN48H.cpp.

uint32_t GetBackColor ( void   )

Gets the LCD background color.

Return values:
Usedbackground colour

Definition at line 278 of file RK043FN48H.cpp.

uint32_t GetDrawColor (  ) [virtual]

Returns the color to draw on selected layer.

Definition at line 107 of file RK043FN48H.cpp.

sFONT * GetFont ( void   )

Gets the LCD text font.

Return values:
Usedlayer font

Definition at line 288 of file RK043FN48H.cpp.

uint32_t GetTextColor ( void   )

Gets the LCD text color.

Return values:
Usedtext color.

Definition at line 268 of file RK043FN48H.cpp.

uint32_t ReadPixel ( uint16_t  Xpos,
uint16_t  Ypos 
)

Reads an LCD pixel.

Parameters:
Xpos,:X position
Ypos,:Y position
Return values:
RGBpixel color

Definition at line 293 of file RK043FN48H.cpp.

void SetBackColor ( uint32_t  Color )

Sets the LCD background color.

Parameters:
Color,:Layer background color code ARGB(8-8-8-8);
Return values:
None

Definition at line 273 of file RK043FN48H.cpp.

void SetBackgroundColor ( uint32_t  color )

Set background color for active layer.

Return values:
None

Definition at line 86 of file RK043FN48H.cpp.

void SetDrawColor ( uint8_t  red,
uint8_t  green,
uint8_t  blue,
uint8_t  alpha 
) [virtual]

Sets the color of the draw.

Parameters:
redThe red.
greenThe green.
blueThe blue.
alphaThe alpha.

Implements DisplayBase.

Definition at line 100 of file RK043FN48H.cpp.

void SetFont ( sFONT *  fonts )

Sets the LCD text font.

Parameters:
fonts,:Layer font to be used
Return values:
None

Definition at line 283 of file RK043FN48H.cpp.

void SetForegroundColor ( uint32_t  color )

Set foreground color for active layer.

Return values:
None

Definition at line 93 of file RK043FN48H.cpp.

void SetTextColor ( uint32_t  Color )

Sets the LCD text color.

Parameters:
Color,:Text color code ARGB(8-8-8-8);
Return values:
None

Definition at line 263 of file RK043FN48H.cpp.