ulalaca-xrdp
ulalaca-xrdp copied to clipboard
[WIP] add CoreGraphics-based text renderer for debugging purposes
TODO
- add multi-line support
- clean up code
#16 완성되면 계속 작업함
작업 방향
@devadversary 님 안녕하세요,
원래대로라면, 아래 이미지처럼 "\n"을 기준으로 텍스트를 한줄씩 나눠서 draw(ULCGTextRenderer(line).render(), x, y)
같은 형태가 되는걸 생각했었습니다.
하지만 xrdp의 비트맵을 그리는 server_paint_rect
가 surface의 어느 부분에 그릴지 정하는 dstX
, dstY
를 지정할 수 없게 되어있기 때문에 위의 방법 대신 다른 방법을 제안드립니다.
-
ULCGTextRenderer
는 생성자에서ULSurface
의 전체 크기와 텍스트를 그릴dstX
,dstY
좌표 위치를 추가로 받습니다. -
ULCGTextRenderer
는 생성자에서 전달받은ULSurface
의 크기만큼의 이미지를 생성하고, 여기에 텍스트를 그립니다. -
ULIPCRect { .x = renderer.x(), .y = renderer.y(), .width = renderer.width(), .height = renderer.height() }
로ULSurface::drawBitmap()
을 호출합니다.
횡설수설한 설명이라 정말 죄송합니다 ㅠㅠㅠ 혹시 더 나은 방법이 있다면 제안해 주세요. :pray:
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
13 Code Smells
No Coverage information
0.0% Duplication