Index: core/fxge/apple/fx_apple_platform.cpp |
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp |
index 6428c1d9e5215e02c09fbbe6166f0a4e35141d3f..403ed4a12e0e81215400a6a4cedd7596a4405c46 100644 |
--- a/core/fxge/apple/fx_apple_platform.cpp |
+++ b/core/fxge/apple/fx_apple_platform.cpp |
@@ -28,18 +28,18 @@ namespace { |
void DoNothing(void* info, const void* data, size_t size) {} |
-FX_BOOL CGDrawGlyphRun(CGContextRef pContext, |
- int nChars, |
- const FXTEXT_CHARPOS* pCharPos, |
- CFX_Font* pFont, |
- const CFX_Matrix* pObject2Device, |
- FX_FLOAT font_size, |
- uint32_t argb) { |
+bool CGDrawGlyphRun(CGContextRef pContext, |
+ int nChars, |
+ const FXTEXT_CHARPOS* pCharPos, |
+ CFX_Font* pFont, |
+ const CFX_Matrix* pObject2Device, |
+ FX_FLOAT font_size, |
+ uint32_t argb) { |
if (nChars == 0) |
- return TRUE; |
+ return true; |
CFX_Matrix new_matrix; |
- FX_BOOL bNegSize = font_size < 0; |
+ bool bNegSize = font_size < 0; |
if (bNegSize) |
font_size = -font_size; |
@@ -53,12 +53,12 @@ FX_BOOL CGDrawGlyphRun(CGContextRef pContext, |
->m_quartz2d; |
if (!pFont->GetPlatformFont()) { |
if (pFont->GetPsName() == "DFHeiStd-W5") |
- return FALSE; |
+ return false; |
pFont->SetPlatformFont( |
quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); |
if (!pFont->GetPlatformFont()) |
- return FALSE; |
+ return false; |
} |
CFX_FixedBufGrow<uint16_t, 32> glyph_indices(nChars); |
CFX_FixedBufGrow<CGPoint, 32> glyph_positions(nChars); |
@@ -103,28 +103,28 @@ void CFX_AggDeviceDriver::DestroyPlatform() { |
} |
} |
-FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
- const FXTEXT_CHARPOS* pCharPos, |
- CFX_Font* pFont, |
- const CFX_Matrix* pObject2Device, |
- FX_FLOAT font_size, |
- uint32_t argb) { |
+bool CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
+ const FXTEXT_CHARPOS* pCharPos, |
+ CFX_Font* pFont, |
+ const CFX_Matrix* pObject2Device, |
+ FX_FLOAT font_size, |
+ uint32_t argb) { |
if (!pFont) |
- return FALSE; |
+ return false; |
- FX_BOOL bBold = pFont->IsBold(); |
+ bool bBold = pFont->IsBold(); |
if (!bBold && pFont->GetSubstFont() && |
pFont->GetSubstFont()->m_Weight >= 500 && |
pFont->GetSubstFont()->m_Weight <= 600) { |
- return FALSE; |
+ return false; |
} |
for (int i = 0; i < nChars; i++) { |
if (pCharPos[i].m_bGlyphAdjust) |
- return FALSE; |
+ return false; |
} |
CGContextRef ctx = CGContextRef(m_pPlatformGraphics); |
if (!ctx) |
- return FALSE; |
+ return false; |
CGContextSaveGState(ctx); |
CGContextSetTextDrawingMode(ctx, kCGTextFillClip); |
@@ -142,7 +142,7 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
CGFloat decode_f[2] = {255.f, 0.f}; |
pImageCG = CGImageMaskCreate( |
pClipMask->GetWidth(), pClipMask->GetHeight(), 8, 8, |
- pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, FALSE); |
+ pClipMask->GetPitch(), pClipMaskDataProvider, decode_f, false); |
CGDataProviderRelease(pClipMaskDataProvider); |
} |
} else { |
@@ -154,8 +154,8 @@ FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
else |
CGContextClipToRect(ctx, rect_cg); |
- FX_BOOL ret = CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pObject2Device, |
- font_size, argb); |
+ bool ret = CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pObject2Device, |
+ font_size, argb); |
if (pImageCG) |
CGImageRelease(pImageCG); |
CGContextRestoreGState(ctx); |