Syntax
void SetOffset(
int offset
);
Parameters
- offset
-
[in] Specify the screen display start position in 0xXXXXYYYY format.
(XXXX:Horizontal position、YYYY:Specify the vertical position in dot units.)
Return value
None
Remarks
This setting does not affect the contents of the displayed screen.
Regarding the cursor position, the current position on the numerical value does not change, but the actual display position moves downward in dot units of the setting contents.
This function is effective when you want to determine the position of the character display line in detail.
Regarding the cursor position, the current position on the numerical value does not change, but the actual display position moves downward in dot units of the setting contents.
This function is effective when you want to determine the position of the character display line in detail.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
void main( void )
{
for(;;)
{
SetFont( TINY_FONT, 0);
printf("\fHello world");
GotoXY( 0, 0);
SetOffset( 0x00060006 );
SetFont( SMALL_FONT, 0);
printf("Hello world");
GotoXY( 0, 0);
SetOffset( 0x0006000E );
SetFont( MEDIUM_FONT, 0);
printf("Hello world");
GotoXY( 0, 0);
SetOffset( 0x000E001A );
SetFont( LARGE_FONT, 0);
printf("Hello world");
ResetKey();
while( !kbhit())
Idle();
}
}
Last updated: 2020/10/02