TextAntialiasMode _TextAntialiasMode;
Color4 _ControlChar,_Forground,_URL,_Hilight;
DW.Factory DWFactory;
-#if METRO
+#if METRO || WINDOWS_UWP
D2D.Factory1 D2DFactory;
#else
D2D.Factory D2DFactory;
public D2DRenderCommon()
{
this.DWFactory = new DW.Factory(DW.FactoryType.Shared);
-#if METRO
+#if METRO || WINDOWS_UWP
this.D2DFactory = new D2D.Factory1(D2D.FactoryType.MultiThreaded);
#else
this.D2DFactory = new D2D.Factory(D2D.FactoryType.MultiThreaded);
this.render.DrawLine(from, to, brush, 1.0f, stroke);
}
+ public const int BoldThickness = 2;
+ public const int NormalThickness = 1;
+
public void DrawMarkerEffect(MyTextLayout layout, HilightType type, int start, int length, double x, double y, bool isBold, Color4? effectColor = null)
{
if (type == HilightType.None)
return;
- float thickness = isBold ? 2 : 1;
+ float thickness = isBold ? BoldThickness : NormalThickness;
Color4 color;
if (effectColor != null)
this.TextAntialiasMode = this._TextAntialiasMode;
}
-#if METRO
+#if METRO || WINDOWS_UWP
protected virtual D2D.RenderTarget ConstructRender(D2D.Factory1 factory, D2D.RenderTargetProperties prop, double width, double height)
#else
protected virtual D2D.RenderTarget ConstructRender(D2D.Factory factory, D2D.RenderTargetProperties prop, double width, double height)