This commit is contained in:
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using C1.C1Pdf;
|
||||
using iTextSharp.text.pdf;
|
||||
using iTextSharp.text.factories;
|
||||
using Microsoft.Win32;
|
||||
@@ -22,41 +21,6 @@ namespace VG
|
||||
void Save(string fileName);
|
||||
float FontSizeAdjust { get;}
|
||||
}
|
||||
public partial class VGOut_C1PDF : IVGOutput
|
||||
{
|
||||
private C1PdfDocument _VGOutput;
|
||||
//public C1PdfDocument VGOutput
|
||||
//{ get { return _VGOutput; } }
|
||||
public static VGOut_C1PDF Create()
|
||||
{
|
||||
C1PdfDocument pdf = new C1.C1Pdf.C1PdfDocument();
|
||||
pdf.FontType = C1.C1Pdf.FontTypeEnum.Embedded; // embed fonts
|
||||
return new VGOut_C1PDF(pdf);
|
||||
}
|
||||
public VGOut_C1PDF(C1PdfDocument vgOutput)
|
||||
{ _VGOutput = vgOutput; }
|
||||
public float Scale
|
||||
// { get { return _VGOutput.Transform.Elements[0]; } }
|
||||
{ get { return 1; } }
|
||||
public void DrawLine(Pen pn, float startx, float starty, float endx, float endy)
|
||||
{ _VGOutput.DrawLine(pn, startx, starty, endx, endy); }
|
||||
public void DrawRectangle(Pen pn, RectangleF rectf)
|
||||
{ _VGOutput.DrawRectangle(pn, rectf.X, rectf.Y, rectf.Width, rectf.Height); }
|
||||
public void DrawEllipse(Pen pn, float cx, float cy, float dx, float dy)
|
||||
{ _VGOutput.DrawEllipse(pn, cx, cy, dx, dy); }
|
||||
public void DrawImage(Bitmap bm, RectangleF rectf)
|
||||
{ _VGOutput.DrawImage(bm, rectf, ContentAlignment.MiddleCenter, ImageSizeModeEnum.Scale); }
|
||||
public void DrawString(string text, Font myFont, Brush brush, RectangleF rectf)
|
||||
{ _VGOutput.DrawString(text, myFont, brush, rectf, StringFormat.GenericTypographic); }
|
||||
public void DrawArc(Pen pn, RectangleF rectf, float startAngle, float sweepAngle)
|
||||
{ _VGOutput.DrawArc(pn, rectf, startAngle, sweepAngle); }
|
||||
public SizeF MeasureString(string text, Font myFont)
|
||||
{ return _VGOutput.MeasureString(text, myFont, 500); } //, StringFormat.GenericTypographic
|
||||
public void Save(string fileName)
|
||||
{ _VGOutput.Save(fileName); }
|
||||
public float FontSizeAdjust
|
||||
{ get { return .95F; } }
|
||||
}
|
||||
public partial class VGOut_Graphics: IVGOutput
|
||||
{
|
||||
private Graphics _VGOutput;
|
||||
|
@@ -371,12 +371,12 @@ namespace VG
|
||||
lnwid = w;
|
||||
pg = ipg;
|
||||
}
|
||||
#if DEBUG
|
||||
//#if DEBUG
|
||||
|
||||
public static int iColor = 0;
|
||||
public Color[] myColors = { Color.Red, Color.Green, Color.OrangeRed, Color.Cyan, Color.Orange, Color.Blue, Color.Yellow, Color.Indigo, Color.YellowGreen, Color.Violet };
|
||||
//public Color[] myColors ={ Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Blue, Color.BlueViolet, Color.Violet };
|
||||
#endif
|
||||
//public static int iColor = 0;
|
||||
//public Color[] myColors = { Color.Red, Color.Green, Color.OrangeRed, Color.Cyan, Color.Orange, Color.Blue, Color.Yellow, Color.Indigo, Color.YellowGreen, Color.Violet };
|
||||
////public Color[] myColors ={ Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Blue, Color.BlueViolet, Color.Violet };
|
||||
//#endif
|
||||
public void Draw(IVGOutput vgOutput)
|
||||
{
|
||||
//#if DEBUG
|
||||
|
Reference in New Issue
Block a user