summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple/fx_apple_platform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/apple/fx_apple_platform.cpp')
-rw-r--r--core/src/fxge/apple/fx_apple_platform.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp
index 9f4712bf7e..9db807c3af 100644
--- a/core/src/fxge/apple/fx_apple_platform.cpp
+++ b/core/src/fxge/apple/fx_apple_platform.cpp
@@ -39,7 +39,7 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph_Nativetext(CFX_Font * pFont,
{
return NULL;
}
-static bool _CGDrawGlyphRun(CGContextRef pContext,
+static FX_BOOL _CGDrawGlyphRun(CGContextRef pContext,
int nChars,
const FXTEXT_CHARPOS* pCharPos,
CFX_Font* pFont,
@@ -51,10 +51,10 @@ static bool _CGDrawGlyphRun(CGContextRef pContext,
void* pIccTransform)
{
if (nChars == 0) {
- return true;
+ return TRUE;
}
CFX_AffineMatrix new_matrix;
- bool bNegSize = font_size < 0;
+ FX_BOOL bNegSize = font_size < 0;
if (bNegSize) {
font_size = -font_size;
}
@@ -66,11 +66,11 @@ static bool _CGDrawGlyphRun(CGContextRef pContext,
CQuartz2D& quartz2d = ((CApplePlatform *) CFX_GEModule::Get()->GetPlatformData())->_quartz2d;
if (!pFont->m_pPlatformFont) {
if (pFont->GetPsName() == CFX_WideString::FromLocal("DFHeiStd-W5")) {
- return false;
+ return FALSE;
}
pFont->m_pPlatformFont = quartz2d.CreateFont(pFont->m_pFontData, pFont->m_dwSize);
if (NULL == pFont->m_pPlatformFont) {
- return false;
+ return FALSE;
}
}
CFX_FixedBufGrow<FX_WORD, 32> glyph_indices(nChars);
@@ -101,7 +101,7 @@ static bool _CGDrawGlyphRun(CGContextRef pContext,
NULL);
}
static void _DoNothing(void *info, const void *data, size_t size) {}
-bool CFX_AggDeviceDriver::DrawDeviceText(int nChars,
+FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars,
const FXTEXT_CHARPOS * pCharPos,
CFX_Font * pFont,
CFX_FontCache * pCache,
@@ -111,22 +111,22 @@ bool CFX_AggDeviceDriver::DrawDeviceText(int nChars,
int alpha_flag, void* pIccTransform)
{
if (!pFont) {
- return false;
+ return FALSE;
}
- bool bBold = pFont->IsBold();
+ FX_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 (NULL == ctx) {
- return false;
+ return FALSE;
}
CGContextSaveGState(ctx);
CGContextSetTextDrawingMode(ctx, kCGTextFillClip);
@@ -143,7 +143,7 @@ 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);
+ decode_f, FALSE);
CGDataProviderRelease(pClipMaskDataProvider);
}
} else {
@@ -155,7 +155,7 @@ bool CFX_AggDeviceDriver::DrawDeviceText(int nChars,
} else {
CGContextClipToRect(ctx, rect_cg);
}
- bool ret = _CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pCache, pObject2Device, font_size, argb, alpha_flag, pIccTransform);
+ FX_BOOL ret = _CGDrawGlyphRun(ctx, nChars, pCharPos, pFont, pCache, pObject2Device, font_size, argb, alpha_flag, pIccTransform);
if (pImageCG) {
CGImageRelease(pImageCG);
}