본문 바로가기

프로젝트/TFT LCD 한글 출력 (아두이노)

한글CLASS 메소드

  

HanGul_SD.H     HanGul_Direct.H                                   Class  메소드
void start() 한글클래스 시작
void end() 한글클래스 종료  : 사용 안해도 됨
void color(int _c  글자색
void color(int _c ,int _bk) 글자색,  배경색
void fill(int _c) 바로 앞에 출력한 문자열을 _c 색으로 채우기 
void fill() 배경색으로 채우기
void rect(int _c) 바로 앞에 출력한 문자열에 _c 색으로 테두리 그리기
void rect() 문자색으로 테두리 그리기
void under(int _c) 바로 앞에 출력한 문자열에 문자색으로 밑줄 그리기
void under()  문자색으로 밑줄 그리기
void print( String s, int x, int y , int mx, int my ) x,y좌표에 가로 mx배 ,세로 my배로 문장 출력
void print( String s,int  x, int y  ) 출력하기
void print( String s,int  x, int y ,int m  ) m배로 출력하기
Class 변 수
box  바로 앞에 출력한 문자열의 박스 좌표  ( box.x,  box.y,  box.x2,  box.y2)    

사용 예

  ht.start();
  ht.color(cWhite,cRed);           // 글자색,배경색
  ht.print(F("★○●◎◇◆"),5,20,2);    // 2배 크기로 
  ht.color(cRed,cBlack);
  ht.print(F("한글 English ☏☎ 123"),5,60,2,1);  // 가로2배 세로 1배
  ht.rect(cRed);          // 방금출력한 문자열의 테두리를 cRed색으로 그리기    
  ht.color(cBlack,cYellow); 
  ht.print(F("English ☏☎ 123"),5,80);
  ht.color(cWhite,cBlack);
  
  #ifdef _INDEX_2_  // 인덱스 방법 2이면
  ht.print(F("인 덱 스 방 법 2"),5,120,1,2); //가로1배 세로 2배
  #else
  ht.print(F("인 덱 스 방 법 1"),5,120,1,2);
  #endif
  
  ht.color(cRed);
  ht.print(F(" ☏☎ 123"),ht.box.x2,120,1,2); // ht.box.x2=마지막출력 문장의 오른쪽 x좌표
  ht.color(cBlue,cBlack);
  ht.rect(cRed);
  ht.print(F("한글 Eng ☏☎ 13"),5,180,3,1); // 가로3배
  ht.color(cYellow,cRed);
  ht.print(F("한글출력 Demo"),5,210,2);  
  ht.color(cWhite,cBlack);
  ht.print(F("가로 세로 따로 조절 가능"),5,250,2);
  ht.under(cRed);     // 방금 출력한 문자에 cRed색으로 밑줄 그리기

  ht.print(F("보다 빠른 속도 개선Speed"),5,290,2);