2018-03-11 20:17:39 -05:00
|
|
|
// 11 march 2018
|
|
|
|
extern "C" {
|
|
|
|
#include "../common/attrstr.h"
|
|
|
|
}
|
|
|
|
|
|
|
|
// opentype.cpp
|
|
|
|
extern IDWriteTypography *uiprivOpenTypeFeaturesToIDWriteTypography(const uiOpenTypeFeatures *otf);
|
2018-03-11 21:11:19 -05:00
|
|
|
|
|
|
|
// fontmatch.cpp
|
|
|
|
extern DWRITE_FONT_WEIGHT uiprivWeightToDWriteWeight(uiTextWeight w);
|
|
|
|
extern DWRITE_FONT_STYLE uiprivItalicToDWriteStyle(uiTextItalic i);
|
|
|
|
extern DWRITE_FONT_STRETCH uiprivStretchToDWriteStretch(uiTextStretch s);
|
2018-03-11 21:36:31 -05:00
|
|
|
extern void uiprivFontDescriptorFromIDWriteFont(IDWriteFont *font, uiFontDescriptor *uidesc);
|
2018-03-13 21:01:15 -05:00
|
|
|
|
|
|
|
// attrstr.cpp
|
|
|
|
extern void uiprivAttributedStringApplyAttributesToDWriteTextLayout(uiDrawTextLayoutParams *p, IDWriteTextLayout *layout, std::vector<backgroundFunc> **backgroundFuncs);
|
|
|
|
|
|
|
|
// drawtext.cpp
|
|
|
|
class drawingEffectsAttr : public IUnknown {
|
|
|
|
ULONG refcount;
|
|
|
|
|
|
|
|
bool hasColor;
|
|
|
|
double r;
|
|
|
|
double g;
|
|
|
|
double b;
|
|
|
|
double a;
|
|
|
|
|
|
|
|
bool hasUnderline;
|
|
|
|
uiUnderline u;
|
|
|
|
|
|
|
|
bool hasUnderlineColor;
|
|
|
|
double ur;
|
|
|
|
double ug;
|
|
|
|
double ub;
|
|
|
|
double ua;
|
|
|
|
public:
|
|
|
|
textDrawingEffect();
|
|
|
|
|
|
|
|
// IUnknown
|
|
|
|
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
|
|
|
|
virtual ULONG STDMETHODCALLTYPE AddRef(void);
|
|
|
|
virtual ULONG STDMETHODCALLTYPE Release(void);
|
|
|
|
|
|
|
|
void setColor(double r, double g, double b, double a);
|
|
|
|
void setUnderline(uiUnderline u);
|
|
|
|
void setUnderlineColor(double r, double g, double b, double a);
|
|
|
|
HRESULT draw(TODO);
|
|
|
|
};
|