File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3802,11 +3802,21 @@ fun getRgnBox(stub SizeOfPointer) SizeOfPointer {
38023802 return 0
38033803}
38043804
3805+ // Win32 Spec: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-gettextalign
38053806@dllExport('GetTextAlign')
3806- fun getTextAlign(stub SizeOfPointer) SizeOfPointer {
3807- // TODO
3808- tofitaDebugLog("GetTextAlign called".utf16())
3809- return 0
3807+ fun getTextAlign(hdc HDc) UInt32 {
3808+ tofitaDebugLog("GetTextAlign called with hdc %8".utf16(), hdc as! UInt64)
3809+
3810+ let dc = hdc as! DC
3811+ if dc == null {
3812+ tofitaDebugLog("> Invalid DC".utf16())
3813+ return 0 // GDI_ERROR
3814+ }
3815+
3816+ // Assume default alignment: TA_LEFT | TA_TOP | TA_NOUPDATECP
3817+ let alignment = 0u32 // TA_LEFT = 0, TA_TOP = 0, TA_NOUPDATECP = 0
3818+ tofitaDebugLog("> Returning alignment %u".utf16(), alignment as! UInt64)
3819+ return alignment
38103820}
38113821
38123822@dllExport('GetTextColor')
You can’t perform that action at this time.
0 commit comments