diff options
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r-- | core/src/fxge/ge/fx_ge_device.cpp | 21 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_path.cpp | 9 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_ps.cpp | 26 | ||||
-rw-r--r-- | core/src/fxge/ge/fx_ge_text.cpp | 33 |
4 files changed, 43 insertions, 46 deletions
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp index a1790bdd22..94efd864c0 100644 --- a/core/src/fxge/ge/fx_ge_device.cpp +++ b/core/src/fxge/ge/fx_ge_device.cpp @@ -71,10 +71,9 @@ FX_BOOL CFX_RenderDevice::CreateCompatibleBitmap(CFX_DIBitmap* pDIB, width, height, m_RenderCaps & FXRC_ALPHA_OUTPUT ? FXDIB_Argb : FXDIB_Rgb); #endif } -FX_BOOL CFX_RenderDevice::SetClip_PathFill( - const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, - int fill_mode) { +FX_BOOL CFX_RenderDevice::SetClip_PathFill(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + int fill_mode) { if (!m_pDeviceDriver->SetClip_PathFill(pPathData, pObject2Device, fill_mode)) { return FALSE; @@ -84,7 +83,7 @@ FX_BOOL CFX_RenderDevice::SetClip_PathFill( } FX_BOOL CFX_RenderDevice::SetClip_PathStroke( const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState) { if (!m_pDeviceDriver->SetClip_PathStroke(pPathData, pObject2Device, pGraphState)) { @@ -113,7 +112,7 @@ void CFX_RenderDevice::UpdateClipBox() { m_ClipBox.bottom = m_Height; } FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, FX_DWORD fill_color, FX_DWORD stroke_color, @@ -212,9 +211,9 @@ FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData, (((fill_alpha >> 2) << 24) | (strokecolor & 0x00ffffff)); } } - CFX_AffineMatrix* pMatrix = NULL; + CFX_Matrix* pMatrix = NULL; if (pObject2Device && !pObject2Device->IsIdentity()) { - pMatrix = (CFX_AffineMatrix*)pObject2Device; + pMatrix = (CFX_Matrix*)pObject2Device; } int smooth_path = FX_ZEROAREA_FILL; if (fill_mode & FXFILL_NOPATHSMOOTH) { @@ -260,7 +259,7 @@ FX_BOOL CFX_RenderDevice::DrawPath(const CFX_PathData* pPathData, } CFX_FxgeDevice bitmap_device; bitmap_device.Attach(&bitmap, 0, FALSE, &Backdrop, TRUE); - CFX_AffineMatrix matrix; + CFX_Matrix matrix; if (pObject2Device) { matrix = *pObject2Device; } @@ -363,7 +362,7 @@ FX_BOOL CFX_RenderDevice::SetDIBits(const CFX_DIBSource* pBitmap, int blend_mode, void* pIccTransform) { ASSERT(!pBitmap->IsAlphaMask()); - CFX_AffineMatrix ctm = GetCTM(); + CFX_Matrix ctm = GetCTM(); FX_FLOAT fScaleX = FXSYS_fabs(ctm.a); FX_FLOAT fScaleY = FXSYS_fabs(ctm.d); FX_RECT dest_rect(left, top, @@ -458,7 +457,7 @@ FX_BOOL CFX_RenderDevice::StretchBitMask(const CFX_DIBSource* pBitmap, FX_BOOL CFX_RenderDevice::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, FX_DWORD argb, - const CFX_AffineMatrix* pMatrix, + const CFX_Matrix* pMatrix, FX_DWORD flags, void*& handle, int alpha_flag, diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp index 4f6c54cac0..543c33ba14 100644 --- a/core/src/fxge/ge/fx_ge_path.cpp +++ b/core/src/fxge/ge/fx_ge_path.cpp @@ -156,8 +156,7 @@ void CFX_PathData::AddPointCount(int addPoints) { AllocPointCount(new_count); m_PointCount = new_count; } -void CFX_PathData::Append(const CFX_PathData* pSrc, - const CFX_AffineMatrix* pMatrix) { +void CFX_PathData::Append(const CFX_PathData* pSrc, const CFX_Matrix* pMatrix) { int old_count = m_PointCount; AddPointCount(pSrc->m_PointCount); FXSYS_memcpy(m_pPoints + old_count, pSrc->m_pPoints, @@ -384,7 +383,7 @@ CFX_FloatRect CFX_PathData::GetBoundingBox(FX_FLOAT line_width, } return rect; } -void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) { +void CFX_PathData::Transform(const CFX_Matrix* pMatrix) { if (pMatrix == NULL) { return; } @@ -393,7 +392,7 @@ void CFX_PathData::Transform(const CFX_AffineMatrix* pMatrix) { } } FX_BOOL CFX_PathData::GetZeroAreaPath(CFX_PathData& NewPath, - CFX_AffineMatrix* pMatrix, + CFX_Matrix* pMatrix, FX_BOOL& bThin, FX_BOOL bAdjust) const { if (m_PointCount < 3) { @@ -563,7 +562,7 @@ FX_BOOL CFX_PathData::IsRect() const { } return m_PointCount == 5 || (m_pPoints[3].m_Flag & FXPT_CLOSEFIGURE); } -FX_BOOL CFX_PathData::IsRect(const CFX_AffineMatrix* pMatrix, +FX_BOOL CFX_PathData::IsRect(const CFX_Matrix* pMatrix, CFX_FloatRect* pRect) const { if (pMatrix == NULL) { if (!IsRect()) { diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp index 018a6005e3..bf0c8c1a16 100644 --- a/core/src/fxge/ge/fx_ge_ps.cpp +++ b/core/src/fxge/ge/fx_ge_ps.cpp @@ -90,7 +90,7 @@ void CFX_PSRenderer::RestoreState(FX_BOOL bKeepSaved) { } } void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device) { + const CFX_Matrix* pObject2Device) { int nPoints = pPathData->GetPointCount(); CFX_ByteTextBuf buf; buf.EstimateSize(nPoints * 10); @@ -137,7 +137,7 @@ void CFX_PSRenderer::OutputPath(const CFX_PathData* pPathData, m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); } void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, int fill_mode) { StartRendering(); OutputPath(pPathData, pObject2Device); @@ -153,7 +153,7 @@ void CFX_PSRenderer::SetClip_PathFill(const CFX_PathData* pPathData, } } void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState) { StartRendering(); SetGraphState(pGraphState); @@ -178,7 +178,7 @@ void CFX_PSRenderer::SetClip_PathStroke(const CFX_PathData* pPathData, } } FX_BOOL CFX_PSRenderer::DrawPath(const CFX_PathData* pPathData, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, FX_DWORD fill_color, FX_DWORD stroke_color, @@ -333,9 +333,9 @@ FX_BOOL CFX_PSRenderer::SetDIBits(const CFX_DIBSource* pSource, int alpha_flag, void* pIccTransform) { StartRendering(); - CFX_AffineMatrix matrix((FX_FLOAT)(pSource->GetWidth()), 0.0f, 0.0f, - -(FX_FLOAT)(pSource->GetHeight()), (FX_FLOAT)(left), - (FX_FLOAT)(top + pSource->GetHeight())); + CFX_Matrix matrix((FX_FLOAT)(pSource->GetWidth()), 0.0f, 0.0f, + -(FX_FLOAT)(pSource->GetHeight()), (FX_FLOAT)(left), + (FX_FLOAT)(top + pSource->GetHeight())); return DrawDIBits(pSource, color, &matrix, 0, alpha_flag, pIccTransform); } FX_BOOL CFX_PSRenderer::StretchDIBits(const CFX_DIBSource* pSource, @@ -348,14 +348,14 @@ FX_BOOL CFX_PSRenderer::StretchDIBits(const CFX_DIBSource* pSource, int alpha_flag, void* pIccTransform) { StartRendering(); - CFX_AffineMatrix matrix((FX_FLOAT)(dest_width), 0.0f, 0.0f, - (FX_FLOAT)(-dest_height), (FX_FLOAT)(dest_left), - (FX_FLOAT)(dest_top + dest_height)); + CFX_Matrix matrix((FX_FLOAT)(dest_width), 0.0f, 0.0f, + (FX_FLOAT)(-dest_height), (FX_FLOAT)(dest_left), + (FX_FLOAT)(dest_top + dest_height)); return DrawDIBits(pSource, color, &matrix, flags, alpha_flag, pIccTransform); } FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource, FX_DWORD color, - const CFX_AffineMatrix* pMatrix, + const CFX_Matrix* pMatrix, FX_DWORD flags, int alpha_flag, void* pIccTransform) { @@ -607,7 +607,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, charpos.m_AdjustMatrix[3]; } pPSFont->m_nGlyphs++; - CFX_AffineMatrix matrix; + CFX_Matrix matrix; if (charpos.m_bGlyphAdjust) matrix.Set(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); @@ -657,7 +657,7 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache, - const CFX_AffineMatrix* pObject2Device, + const CFX_Matrix* pObject2Device, FX_FLOAT font_size, FX_DWORD color, int alpha_flag, diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index f01bdcfb3e..5e7773e300 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -176,7 +176,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, CFX_Font* pFont, CFX_FontCache* pCache, FX_FLOAT font_size, - const CFX_AffineMatrix* pText2Device, + const CFX_Matrix* pText2Device, FX_DWORD fill_color, FX_DWORD text_flags, int alpha_flag, @@ -220,7 +220,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, return TRUE; } } - CFX_AffineMatrix char2device, deviceCtm, text2Device; + CFX_Matrix char2device, deviceCtm, text2Device; if (pText2Device) { char2device = *pText2Device; text2Device = *pText2Device; @@ -272,7 +272,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, FXTEXT_GLYPHPOS* pGlyphAndPos = FX_Alloc(FXTEXT_GLYPHPOS, nChars); int iChar; deviceCtm = char2device; - CFX_AffineMatrix matrixCTM = GetCTM(); + CFX_Matrix matrixCTM = GetCTM(); FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); @@ -290,7 +290,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, } glyph.m_OriginY = FXSYS_round(glyph.m_fOriginY); if (charpos.m_bGlyphAdjust) { - CFX_AffineMatrix new_matrix( + CFX_Matrix new_matrix( charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); new_matrix.Concat(deviceCtm); @@ -1108,8 +1108,8 @@ FX_BOOL CFX_RenderDevice::DrawTextPath(int nChars, CFX_Font* pFont, CFX_FontCache* pCache, FX_FLOAT font_size, - const CFX_AffineMatrix* pText2User, - const CFX_AffineMatrix* pUser2Device, + const CFX_Matrix* pText2User, + const CFX_Matrix* pUser2Device, const CFX_GraphStateData* pGraphState, FX_DWORD fill_color, FX_ARGB stroke_color, @@ -1125,7 +1125,7 @@ FX_BOOL CFX_RenderDevice::DrawTextPath(int nChars, FX_FONTCACHE_DEFINE(pCache, pFont); for (int iChar = 0; iChar < nChars; iChar++) { const FXTEXT_CHARPOS& charpos = pCharPos[iChar]; - CFX_AffineMatrix matrix; + CFX_Matrix matrix; if (charpos.m_bGlyphAdjust) matrix.Set(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); @@ -1252,7 +1252,7 @@ void CFX_FaceCache::InitPlatform() {} #endif CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap( CFX_Font* pFont, - const CFX_AffineMatrix* pMatrix, + const CFX_Matrix* pMatrix, CFX_ByteStringC& FaceGlyphsKey, FX_DWORD glyph_index, FX_BOOL bFontStyle, @@ -1279,14 +1279,13 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap( pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap); return pGlyphBitmap; } -const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap( - CFX_Font* pFont, - FX_DWORD glyph_index, - FX_BOOL bFontStyle, - const CFX_AffineMatrix* pMatrix, - int dest_width, - int anti_alias, - int& text_flags) { +const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont, + FX_DWORD glyph_index, + FX_BOOL bFontStyle, + const CFX_Matrix* pMatrix, + int dest_width, + int anti_alias, + int& text_flags) { if (glyph_index == (FX_DWORD)-1) { return NULL; } @@ -1518,7 +1517,7 @@ static void _ContrastAdjust(uint8_t* pDataIn, CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_index, FX_BOOL bFontStyle, - const CFX_AffineMatrix* pMatrix, + const CFX_Matrix* pMatrix, int dest_width, int anti_alias) { if (m_Face == NULL) { |