FontStyle fontStyle;
D3DImage imageSource;
- public D2DRender(FooTextBox textbox, double width, double height,Image image)
+ public D2DRender(FooTextBox textbox, double width, double height, Image image)
{
this.fontFamily = textbox.FontFamily;
this.fontSize = textbox.FontSize;
set
{
this.fontWeigth = value;
- this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(value),this.GetDWFontStyle(this.fontStyle));
+ this.InitTextFormat(this.fontFamily.Source, (float)this.fontSize, this.GetDWFontWeigth(value), this.GetDWFontStyle(this.fontStyle));
}
}
this.ConstructRenderAndResource(width, height);
}
- public void DrawContent(EditView view,bool IsEnabled,Rectangle updateRect)
+ public void DrawContent(EditView view, bool IsEnabled, Rectangle updateRect)
{
if (this.imageSource.IsFrontBufferAvailable)
{
}
}
- public void DrawOneLine(Document doc,LineToIndexTable lti, int row, double x, double y)
+ public void DrawOneLine(Document doc, LineToIndexTable lti, int row, double x, double y)
{
PreDrawOneLineHandler PreDrawOneLine = null;
);
}
- private void DrawImeConversionLine(MyTextLayout layout,LineToIndexTable lti,int row,double x,double y)
+ private void DrawImeConversionLine(MyTextLayout layout, LineToIndexTable lti, int row, double x, double y)
{
using (Unlocker locker = this.store.LockDocument(false))
{
private Color4? GetColor4(TF_DA_COLOR cr)
{
COLORREF colorref;
- switch(cr.type)
+ switch (cr.type)
{
case TF_DA_COLORTYPE.TF_CT_SYSCOLOR:
colorref = new COLORREF(NativeMethods.GetSysColor((int)cr.indexOrColorRef));
resource.Dispose();
texture.Dispose();
- this.render = new D2D.RenderTarget(this.D2DFactory, this.surface, prop);
+ this.render = new D2D.RenderTarget(D2DRenderShared.D2DFactory, this.surface, prop);
D2D.BitmapProperties bmpProp = new D2D.BitmapProperties();
bmpProp.DpiX = dpiX;
this.cachedBitMap = new D2D.Bitmap(this.render, new SharpDX.Size2((int)width, (int)height), bmpProp);
this.hasCache = false;
- this.textRender = new CustomTextRenderer(this.render, this.Brushes, this.Strokes, this.Foreground);
+ this.textRender = new CustomTextRenderer(this.Brushes, this.Strokes, this.Foreground);
this.renderSize = new Size(width, height);
}
this.cachedBitMap.Dispose();
this.Brushes.Clear();
this.Strokes.Clear();
- //ここでDispose()すると落ちる
- //if (this.textRender != null)
- // this.textRender.Dispose();
+ if (this.textRender != null)
+ this.textRender.Dispose();
if (this.texture != null)
this.texture.Dispose();
if (this.surface != null)