void TextRenderHdc::SetTextBgColor(Gdiplus::Color col) { CrashIf(!hdc); if (textBgColor.GetValue() == col.GetValue()) { return; } textBgColor = col; ::SetBkColor(hdc, textBgColor.ToCOLORREF()); }
void TextRenderGdiplus::SetTextColor(Gdiplus::Color col) { if (textColor.GetValue() == col.GetValue()) { return; } textColor = col; ::delete textColorBrush; textColorBrush = ::new SolidBrush(col); }
void CColors::SetColor (GDIPlusColorTable id, int index, Gdiplus::Color color) { CRegDWORDList* setting = GetRegistrySetting (id); if (setting == NULL) return; (*setting)[index] = color.GetValue(); }
void TextRenderGdi::SetTextColor(Gdiplus::Color col) { if (textColor.GetValue() == col.GetValue()) { return; } textColor = col; if (hdcGfxLocked) { ::SetTextColor(hdcGfxLocked, col.ToCOLORREF()); } }
void CanvasGDIP::Clear(const Gdiplus::Color& color) { if (color.GetValue() == 0x00000000) { memset(m_DIBSectionBufferPixels, 0, m_W * m_H * 4); } else { m_Graphics->Clear(color); } }
bool TextInlineFormat_Color::CompareAndUpdateProperties(const std::wstring& pattern, const Gdiplus::Color& color) { if (_wcsicmp(GetPattern().c_str(), pattern.c_str()) != 0 || m_Color.GetValue() != color.GetValue()) { SetPattern(pattern); m_Color = color; return true; } return false; }
bool TextInlineFormat_Shadow::CompareAndUpdateProperties(const std::wstring& pattern, const FLOAT& blur, const D2D1_POINT_2F& offset, const Gdiplus::Color& color) { if (_wcsicmp(GetPattern().c_str(), pattern.c_str()) != 0 || m_Color.GetValue() != color.GetValue()) { SetPattern(pattern); m_Offset = offset; m_Color = color; return true; } return false; }
void CSettingsRevisionGraphColors::ApplyColor ( CMFCColorButton& button , CColors::GDIPlusColorTable table , int index) { COLORREF value = button.GetColor() == -1 ? button.GetAutomaticColor() : button.GetColor(); Gdiplus::Color temp; temp.SetFromCOLORREF (value); m_Colors.SetColor (table, index, (temp.GetValue() & 0xffffff) + 0xff000000); }
void CSettingsRevisionGraphColors::ApplyColor ( CMFCColorButton& button , CColors::GDIPlusColor color , DWORD alpha) { COLORREF value = button.GetColor() == -1 ? button.GetAutomaticColor() : button.GetColor(); Gdiplus::Color temp; temp.SetFromCOLORREF (value); m_Colors.SetColor (color, (temp.GetValue() & 0xffffff) + (alpha << 24)); }