35#include <unordered_set>
37#ifndef INCLUDED_PRE_POST_WIN_H
38#define INCLUDED_PRE_POST_WIN_H
48class PhysicalFontCollection;
49class FontSelectPattern;
52class ImplFontAttrCache;
57#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
58#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
66 BYTE nPitchAndFamily );
74 bool HasChar( sal_uInt32 cChar )
const;
129 static std::unique_ptr< CompatibleDC >
create(
SalGraphics &rGraphics,
int x,
int y,
int width,
int height);
233 virtual void drawPolyLine( sal_uInt32 nPoints,
const Point* pPtAry )
override;
234 virtual void drawPolygon( sal_uInt32 nPoints,
const Point* pPtAry )
override;
235 virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const Point** pPtAry )
override;
239 double fTransparency)
override;
243 double fTransparency,
245 const std::vector< double >* pStroke,
247 css::drawing::LineCap,
248 double fMiterMinimumAngle,
249 bool bPixelSnapHairline)
override;
258 tools::Long nSrcHeight,
bool bWindowInvalidate )
override;
266 const SalBitmap& rTransparentBitmap )
override;
269 Color nMaskColor )
override;
276 virtual void invert( sal_uInt32 nPoints,
const Point* pPtAry,
SalInvert nFlags )
override;
284 const Point& aPos,
bool& rIsInside )
override;
287 const OUString& aCaption,
const Color& rBackgroundColor )
override;
299 const SalBitmap& rAlphaBitmap )
override;
303 const SalBitmap& rAlphaBitmap )
override;
310 double fAlpha)
override;
394 std::vector< sal_Int32 >& rWidths,
397 virtual std::unique_ptr<GenericSalLayout>
415#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
Class that creates (and destroys) a compatible Device Context.
tools::Long getBitmapHeight() const
HDC mhCompatibleDC
The compatible DC that we create for our purposes.
SalTwoRect maRects
Mapping between the GDI position and OpenGL, to use for OpenGL drawing.
HBITMAP mhOrigBitmap
Return the previous bitmap to undo the SelectObject.
void fill(sal_uInt32 color)
Reset the DC with the defined color.
tools::Long getBitmapWidth() const
HBITMAP mhBitmap
DIBSection that we use for the GDI drawing, and later obtain.
sal_uInt32 * mpData
DIBSection data.
CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true)
WinSalGraphicsImplBase * mpImpl
The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly...
static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height)
SalTwoRect getTwoRect() const
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Implementation class for SalGraphics.
virtual ~WinFontFace() override
virtual rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &) const override
void UpdateFromHDC(HDC) const
bool mbFontCapabilitiesRead
vcl::FontCapabilities maFontCapabilities
void ReadCmapTable(HDC) const
FontCharMapRef mxUnicodeMap
virtual sal_IntPtr GetFontId() const override
FontCharMapRef GetFontCharMap() const override
bool HasChar(sal_uInt32 cChar) const
BYTE GetPitchAndFamily() const
WinFontFace(const FontAttributes &, BYTE eWinCharSet, BYTE nPitchAndFamily)
void GetFontCapabilities(HDC hDC) const
bool GetFontCapabilities(vcl::FontCapabilities &) const override
void SetFontId(sal_IntPtr nId)
WinSalGraphics never owns the HDC it uses to draw, because the HDC can have various origins with diff...
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void ClearDevFontCache() override
UINT setPalette(HPALETTE, BOOL bForceBkgd=TRUE)
virtual void SetLineColor() override
virtual bool AddTempDevFont(vcl::font::PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
virtual sal_uInt16 GetBitCount() const override
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
virtual bool hitTestNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) override
Query if a position is inside the native widget part.
bool isVirtualDevice() const
friend class WinSalGraphicsImpl
SalGraphicsImpl * GetImpl() const override
virtual const void * GetEmbedFontData(const vcl::font::PhysicalFontFace *, tools::Long *pDataLen) override
virtual bool hasFastDrawTransformedBitmap() const override
Returns true if the drawTransformedBitmap() call is fast, and so it should be used directly without t...
virtual void SetLineColor(Color nColor) override
virtual bool drawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor) override
Draw the requested control.
virtual void DrawTextLayout(const GenericSalLayout &) override
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
virtual tools::Long GetGraphicsWidth() const override
virtual void SetROPLineColor(SalROPColor nROPColor) override
std::tuple< HFONT, bool, sal_Int32 > ImplDoSetFont(HDC hDC, vcl::font::FontSelectPattern const &i_rFont, const vcl::font::PhysicalFontFace *i_pFontFace, HFONT &o_rOldFont)
virtual bool isNativeControlSupported(ControlType nType, ControlPart nPart) override
Query the platform layer for native control support.
virtual void SetTextColor(Color nColor) override
void DrawTextLayout(const GenericSalLayout &, HDC, bool bUseDWrite, bool bRenderingModeNatural)
virtual bool CreateFontSubset(const OUString &rToFile, const vcl::font::PhysicalFontFace *, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo) override
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
virtual bool getNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) override
Get the native control regions for the control part.
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
virtual bool supportsOperation(OutDevSupportType) const override
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
virtual void SetXORMode(bool bSet, bool) override
WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd, SalGeometryProvider *pProvider)
virtual void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
rtl::Reference< WinFontInstance > mpWinFontEntry[MAX_FALLBACK]
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
RGNDATA * mpStdClipRgnData
virtual void ResetClipRegion() override
virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
Render solid rectangle with given transparency.
virtual void SetFillColor(Color nColor) override
virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
HPALETTE getDefPal() const
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel) override
virtual void SetFillColor() override
virtual bool drawGradient(const tools::PolyPolygon &, const Gradient &) override
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
virtual FontCharMapRef GetFontCharMap() const override
virtual bool drawPolyLine(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle, bool bPixelSnapHairline) override
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override
virtual void SetROPFillColor(SalROPColor nROPColor) override
virtual bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) override
virtual Color getPixel(tools::Long nX, tools::Long nY) override
virtual bool setClipRegion(const vcl::Region &) override
virtual bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system
virtual ~WinSalGraphics() override
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rTransparentBitmap) override
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
static void updateSettingsNative(AllSettings &rSettings)
Update settings based on the platform values.
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.
virtual void GetDevFontList(vcl::font::PhysicalFontCollection *) override
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
virtual void GetGlyphWidths(const vcl::font::PhysicalFontFace *, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc) override
virtual void drawPixel(tools::Long nX, tools::Long nY) override
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
Draw the bitmap by blending using the mask and alpha channel.
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
virtual SystemGraphicsData GetGraphicsData() const override
std::unique_ptr< SalGraphicsImpl > mpImpl
abstract base class for physical font faces
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
const wchar_t *typedef BOOL
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
int ImplIsSysColorEntry(Color nColor)
void ImplGetLogFontFromFontSelect(const vcl::font::FontSelectPattern &, const vcl::font::PhysicalFontFace *, LOGFONTW &)
void ImplUpdateSysColorEntries()