port(EterLib): TextBar/DibBar/BlockTexture for uiTip TipBoard/BigBoard
TextBar and DibBar verbatim over the FreeType GDI shim (+GetTextExtentPoint32A); BlockTexture verbatim except Render, which records the clipped quad as a UI image of the device CPU texture (UIRenderAddImageNamed). Notices now render; port.text_bar covers block split, pixels, colour, ClearBar and TipBoard clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c7bcb9bbbe
commit
6d2d262de8
@@ -194,6 +194,10 @@ if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
|
||||
target_link_libraries(port_text_test PRIVATE port_platform)
|
||||
add_test(NAME port.text COMMAND $<TARGET_FILE:port_text_test>)
|
||||
set_tests_properties(port.text PROPERTIES SKIP_RETURN_CODE 77)
|
||||
add_executable(port_text_bar_test ${PROJECT_SOURCE_DIR}/tests/port/port_text_bar_test.cpp)
|
||||
target_link_libraries(port_text_bar_test PRIVATE port_platform)
|
||||
add_test(NAME port.text_bar COMMAND $<TARGET_FILE:port_text_bar_test>)
|
||||
set_tests_properties(port.text_bar PROPERTIES SKIP_RETURN_CODE 77)
|
||||
|
||||
# MilesLib: the 40250 sound managers over the Miles emulation (platform/MilesLib/MilesAil.cpp).
|
||||
add_executable(port_miles_test ${PROJECT_SOURCE_DIR}/tests/port/port_miles_test.cpp)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "GrpBase.h"
|
||||
|
||||
class CGraphicDib;
|
||||
|
||||
class CBlockTexture : public CGraphicBase
|
||||
{
|
||||
public:
|
||||
CBlockTexture();
|
||||
virtual ~CBlockTexture();
|
||||
|
||||
bool Create(CGraphicDib * pDIB, const RECT & c_rRect, DWORD dwWidth, DWORD dwHeight);
|
||||
void SetClipRect(const RECT & c_rRect);
|
||||
void Render(int ix, int iy);
|
||||
void InvalidateRect(const RECT & c_rsrcRect);
|
||||
|
||||
protected:
|
||||
CGraphicDib * m_pDIB;
|
||||
RECT m_rect;
|
||||
RECT m_clipRect;
|
||||
BOOL m_bClipEnable;
|
||||
DWORD m_dwWidth;
|
||||
DWORD m_dwHeight;
|
||||
LPDIRECT3DTEXTURE8 m_lpd3dTexture;
|
||||
};
|
||||
@@ -58,6 +58,8 @@ COLORREF SetTextColor(HDC hdc, COLORREF color);
|
||||
COLORREF SetBkColor(HDC hdc, COLORREF color);
|
||||
int SetBkMode(HDC hdc, int mode);
|
||||
BOOL GetTextExtentPoint32W(HDC hdc, LPCWSTR lpString, int c, LPSIZE psizl);
|
||||
BOOL GetTextExtentPoint32A(HDC hdc, LPCSTR lpString, int c, LPSIZE psizl);
|
||||
#define GetTextExtentPoint32 GetTextExtentPoint32A
|
||||
BOOL GetCharABCWidthsFloatW(HDC hdc, UINT iFirst, UINT iLast, LPABCFLOAT lpABC);
|
||||
BOOL TextOutW(HDC hdc, int x, int y, LPCWSTR lpString, int c);
|
||||
BOOL TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c);
|
||||
|
||||
Reference in New Issue
Block a user