HpglGraphicsRenderer.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. using FastReport.Export.Hpgl;
  2. using FastReport.Export.Hpgl.Utils;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Drawing;
  6. using System.Drawing.Drawing2D;
  7. using System.Drawing.Imaging;
  8. using System.Drawing.Text;
  9. using System.Linq;
  10. using System.Text;
  11. namespace FastReport.Utils
  12. {
  13. internal class HpglGraphicsRenderer : IGraphics
  14. {
  15. private HpglDocument hpglDocument;
  16. private Graphics measureGraphics;
  17. private Bitmap internalImage;
  18. private System.Drawing.Drawing2D.Matrix transformMatrix;
  19. private HpglFillMode fillMode;
  20. private float barcodesGap;
  21. float IGraphics.DpiY {
  22. get
  23. {
  24. throw new NotImplementedException();
  25. }
  26. }
  27. TextRenderingHint IGraphics.TextRenderingHint
  28. {
  29. get
  30. {
  31. throw new NotImplementedException();
  32. }
  33. set
  34. {
  35. throw new NotImplementedException();
  36. }
  37. }
  38. InterpolationMode IGraphics.InterpolationMode
  39. {
  40. get
  41. {
  42. throw new NotImplementedException();
  43. }
  44. set
  45. {
  46. throw new NotImplementedException();
  47. }
  48. }
  49. SmoothingMode IGraphics.SmoothingMode
  50. {
  51. get
  52. {
  53. throw new NotImplementedException();
  54. }
  55. set
  56. {
  57. throw new NotImplementedException();
  58. }
  59. }
  60. Graphics IGraphics.Graphics {
  61. get
  62. {
  63. throw new NotImplementedException();
  64. }
  65. }
  66. System.Drawing.Drawing2D.Matrix IGraphics.Transform
  67. {
  68. get
  69. {
  70. throw new NotImplementedException();
  71. }
  72. set
  73. {
  74. throw new NotImplementedException();
  75. }
  76. }
  77. GraphicsUnit IGraphics.PageUnit
  78. {
  79. get
  80. {
  81. throw new NotImplementedException();
  82. }
  83. set
  84. {
  85. throw new NotImplementedException();
  86. }
  87. }
  88. bool IGraphics.IsClipEmpty {
  89. get
  90. {
  91. throw new NotImplementedException();
  92. }
  93. }
  94. Region IGraphics.Clip
  95. {
  96. get
  97. {
  98. throw new NotImplementedException();
  99. }
  100. set
  101. {
  102. throw new NotImplementedException();
  103. }
  104. }
  105. float IGraphics.DpiX {
  106. get
  107. {
  108. throw new NotImplementedException();
  109. }
  110. }
  111. CompositingQuality IGraphics.CompositingQuality
  112. {
  113. get
  114. {
  115. throw new NotImplementedException();
  116. }
  117. set
  118. {
  119. throw new NotImplementedException();
  120. }
  121. }
  122. public HpglGraphicsRenderer(HpglDocument hpglDocument, HpglFillMode fillMode, float barcodesGap)
  123. {
  124. this.internalImage = new Bitmap(1, 1);
  125. this.hpglDocument = hpglDocument;
  126. this.measureGraphics = Graphics.FromImage(internalImage);
  127. transformMatrix = new System.Drawing.Drawing2D.Matrix();
  128. this.fillMode = fillMode;
  129. this.barcodesGap = barcodesGap;
  130. }
  131. private LineStyle GetLineStyle(DashStyle dashStyle)
  132. {
  133. LineStyle lineStyle;
  134. switch (dashStyle)
  135. {
  136. case DashStyle.Dash:
  137. lineStyle = LineStyle.Dash; break;
  138. case DashStyle.DashDot:
  139. lineStyle = LineStyle.DashDot; break;
  140. case DashStyle.DashDotDot:
  141. lineStyle = LineStyle.DashDotDot; break;
  142. case DashStyle.Dot:
  143. lineStyle = LineStyle.Dot; break;
  144. case DashStyle.Solid:
  145. default:
  146. lineStyle = LineStyle.Solid; break;
  147. }
  148. return lineStyle;
  149. }
  150. public void Dispose()
  151. {
  152. //if (hpglDocument != null)
  153. //{
  154. // hpglDocument.Clear();
  155. // hpglDocument = null;
  156. //}
  157. if (measureGraphics != null)
  158. {
  159. measureGraphics.Dispose();
  160. measureGraphics = null;
  161. }
  162. }
  163. public void DrawEllipse(Pen pen, float left, float top, float width, float height)
  164. {
  165. LineStyle lineStyle = GetLineStyle(pen.DashStyle);
  166. hpglDocument.DrawEllipse(left + transformMatrix.OffsetX, transformMatrix.OffsetY - top, width, height, pen.Color, pen.Width, lineStyle);
  167. }
  168. private PointF GetOrtogonalPoint(PointF a, PointF b, float bc)
  169. {
  170. float x2x1 = a.X - b.X;
  171. float y2y1 = a.Y - b.Y;
  172. float ab = (float)Math.Sqrt(x2x1 * x2x1 + y2y1 * y2y1);
  173. float v1x = (b.X - a.X) / ab;
  174. float v1y = (b.Y - a.Y) / ab;
  175. float v3x = (v1y > 0 ? -v1y : v1y) * bc;
  176. float v3y = (v1x > 0 ? v1x : -v1x) * bc;
  177. PointF c = new PointF();
  178. c.X = a.X + v3x;
  179. c.Y = a.Y + v3y;
  180. return c;
  181. }
  182. public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
  183. {
  184. LineStyle lineStyle = GetLineStyle(pen.DashStyle);
  185. //if(fillMode != HpglFillMode.Border)
  186. // hpglDocument.DrawLine(x1 + transformMatrix.OffsetX, transformMatrix.OffsetY - y1, x2 + transformMatrix.OffsetX, transformMatrix.OffsetY - y2, pen.Color, pen.Width, lineStyle);
  187. //else
  188. {
  189. PointF[] points = new PointF[4];
  190. points[0] = GetOrtogonalPoint(new PointF(x1, y1), new PointF(x2, y2), pen.Width / 2);
  191. points[1] = GetOrtogonalPoint(new PointF(x2, y2), new PointF(x1, y1), pen.Width / 2);
  192. points[2] = GetOrtogonalPoint(new PointF(x2, y2), new PointF(x1, y1), -pen.Width / 2);
  193. points[3] = GetOrtogonalPoint(new PointF(x1, y1), new PointF(x2, y2), -pen.Width / 2);
  194. SolidBrush brush = (fillMode == HpglFillMode.Border) ? null : new SolidBrush(pen.Color);
  195. hpglDocument.DrawPolygon(transformMatrix.OffsetX, transformMatrix.OffsetY, points.InvertY(), new byte[points.Length],
  196. (pen.Brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid, brush);
  197. }
  198. }
  199. public void DrawString(string text, Font drawFont, Brush brush, float left, float top)
  200. {
  201. //ToDo - baseLine
  202. DrawStringInternal(text, drawFont, brush, left, top, 0);
  203. }
  204. public void DrawString(string text, Font drawFont, Brush brush, float left, float top, float baseLine)
  205. {
  206. DrawStringInternal(text, drawFont, brush, left, top, baseLine);
  207. }
  208. public void DrawString(string text, Font drawFont, Brush brush, RectangleF rectangleF)
  209. {
  210. //ToDo - baseLine
  211. DrawStringInternal(text, drawFont, brush, rectangleF.X, rectangleF.Y, 0);
  212. }
  213. private void DrawStringInternal(string text, Font font, Brush brush, float left, float top, float baseLine)
  214. {
  215. if (!String.IsNullOrEmpty(text))
  216. {
  217. GraphicsPath myPath = new GraphicsPath();
  218. PointF origin = new PointF(0, 0);
  219. // Add the string to the path.
  220. myPath.AddString(text,
  221. font.FontFamily,
  222. (int)font.Style,
  223. font.Size,
  224. origin,
  225. StringFormat.GenericDefault);
  226. if (brush is SolidBrush)
  227. AddGraphicsPath(myPath, (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid, transformMatrix.OffsetX + left,
  228. transformMatrix.OffsetY - top, true, true, 0, new PointF(0, 0));
  229. }
  230. }
  231. private void FillGraphicsPath(float x, float y, GraphicsPath path, Brush brush, bool invertY)
  232. {
  233. List<PointF> points = new List<PointF>();
  234. List<byte> pTypes = new List<byte>();
  235. byte[] pathTypes = path.PathTypes;
  236. PointF[] pathPoints = path.PathPoints;
  237. if (invertY)
  238. pathPoints = pathPoints.InvertY();
  239. for (int i = 0; i < pathTypes.Length; i++)
  240. {
  241. byte pType = pathTypes[i];
  242. PointF point = pathPoints[i];
  243. if (pType == 0 && points.Count > 0)
  244. {
  245. if (fillMode == HpglFillMode.Solid)
  246. hpglDocument.FillPolygon(x, y, points.ToArray(), pTypes.ToArray(), brush);
  247. else
  248. hpglDocument.DrawPolygon(x, y, points.ToArray(), pTypes.ToArray(), (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid);
  249. points.Clear();
  250. pTypes.Clear();
  251. }
  252. points.Add(point);
  253. pTypes.Add(pType);
  254. if (i == pathTypes.Length - 1)
  255. {
  256. if (fillMode == HpglFillMode.Solid)
  257. hpglDocument.FillPolygon(0, 0, points.ToArray(), pTypes.ToArray(), brush);
  258. else
  259. hpglDocument.DrawPolygon(0, 0, points.ToArray(), pTypes.ToArray(), (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid);
  260. }
  261. }
  262. }
  263. public static PointF[] RotateVector(PointF[] vector, double angle, PointF center)
  264. {
  265. PointF[] rotatedVector = new PointF[vector.Length];
  266. for (int i = 0; i < vector.Length; i++)
  267. {
  268. rotatedVector[i].X = (float)(center.X + (vector[i].X - center.X) * Math.Cos(angle) + (center.Y - vector[i].Y) * Math.Sin(angle));
  269. rotatedVector[i].Y = (float)(center.Y + (vector[i].X - center.X) * Math.Sin(angle) + (vector[i].Y - center.Y) * Math.Cos(angle));
  270. }
  271. return rotatedVector;
  272. }
  273. private void AddGraphicsPath(GraphicsPath path, Color borderColor, float borderWith,
  274. LineStyle borderLineStyle, float left, float top, bool isClosed, bool invertY, float angle, PointF center)
  275. {
  276. List<PointF> points = new List<PointF>();
  277. List<byte> pTypes = new List<byte>();
  278. byte[] pathTypes = path.PathTypes;
  279. PointF[] pathPoints = path.PathPoints;
  280. if (angle != 0)
  281. {
  282. // rotate
  283. pathPoints = RotateVector(pathPoints, angle, center);
  284. }
  285. if (invertY)
  286. pathPoints = pathPoints.InvertY();
  287. for (int i = 0; i < pathTypes.Length; i++)
  288. {
  289. byte pType = pathTypes[i];
  290. PointF point = pathPoints[i];
  291. if (pType == 0 && points.Count > 0)
  292. {
  293. AddPath(points.ToArray(), pTypes.ToArray(), borderColor, borderWith,
  294. borderLineStyle, left, top, isClosed);
  295. points.Clear();
  296. pTypes.Clear();
  297. }
  298. points.Add(point);
  299. pTypes.Add(pType);
  300. if (i == pathTypes.Length - 1)
  301. {
  302. AddPath(points.ToArray(), pTypes.ToArray(), borderColor, borderWith,
  303. borderLineStyle, left, top, isClosed);
  304. }
  305. }
  306. }
  307. private void AddPath(PointF[] points, byte[] pointTypes, Color borderColor, float borderWidth,
  308. LineStyle borderLineStyle, float left, float top, bool isClosed)
  309. {
  310. float x = left;
  311. float y = top;
  312. hpglDocument.DrawPolyLine(x, y, points, pointTypes, borderColor, borderWidth / Units.Millimeters,
  313. borderLineStyle, isClosed);
  314. }
  315. public void FillPath(Brush brush, GraphicsPath path)
  316. {
  317. if (fillMode == HpglFillMode.Solid && brush is SolidBrush)
  318. FillGraphicsPath(transformMatrix.OffsetX, transformMatrix.OffsetY, path, brush, true);
  319. else
  320. AddGraphicsPath(path, (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid, transformMatrix.OffsetX,
  321. transformMatrix.OffsetY, true, true, 0, new PointF(0, 0));
  322. }
  323. public void FillPolygon(Brush brush, PointF[] points)
  324. {
  325. if (fillMode == HpglFillMode.Solid && brush is SolidBrush)
  326. hpglDocument.FillPolygon(transformMatrix.OffsetX, transformMatrix.OffsetY, points.InvertY(), new byte[points.Length], brush);
  327. else
  328. hpglDocument.DrawPolygon(transformMatrix.OffsetX, transformMatrix.OffsetY, points.InvertY(), new byte[points.Length], (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid);
  329. //if (brush is SolidBrush)
  330. // hpglDocument.FillPolygon(transformMatrix.OffsetX, transformMatrix.OffsetY, points.InvertY(), new byte[points.Length], (brush as SolidBrush).Color);
  331. }
  332. private void TransformPoints(System.Drawing.Drawing2D.Matrix fTransformMatrix, PointF[] points)
  333. {
  334. float a = fTransformMatrix.Elements[0]; // scale horizontal
  335. float b = fTransformMatrix.Elements[1]; // lean vert
  336. float c = fTransformMatrix.Elements[2]; // lean horizontal
  337. float d = fTransformMatrix.Elements[3]; //scale vertical
  338. float e = fTransformMatrix.Elements[4]; // x offset
  339. float f = 0;// fTransformMatrix.Elements[5]; // y offset
  340. for (int i = 0; i < points.Length; i++)
  341. {
  342. float x0 = points[i].X;
  343. float y0 = points[i].Y;
  344. float x1 = a * x0 + c * y0 + e;
  345. float y1 = b * x0 + d * y0 + f;
  346. points[i].X = x1;
  347. points[i].Y = y1;
  348. }
  349. }
  350. public void FillRectangle(Brush brush, float left, float top, float width, float height)
  351. {
  352. if (brush is SolidBrush)
  353. {
  354. //if o degies
  355. // hpglDocument.FillRectangle(left + transformMatrix.OffsetX, transformMatrix.OffsetY - top - height, width, height, (brush as SolidBrush).Color);
  356. //else
  357. PointF[] points = new PointF[4];
  358. points[0] = new PointF(left, top);
  359. points[1] = new PointF(left + width, top);
  360. points[2] = new PointF(left + width, top + height);
  361. points[3] = new PointF(left, top + height);
  362. TransformPoints(transformMatrix, points);
  363. points = points.InvertY();
  364. if (fillMode == HpglFillMode.Solid && brush is SolidBrush)
  365. hpglDocument.FillPolygon(0, transformMatrix.OffsetY, points, new byte[points.Length], brush);
  366. else
  367. hpglDocument.DrawPolygon(0, transformMatrix.OffsetY, points, new byte[points.Length], (brush as SolidBrush).Color, 1 / 100.0f, LineStyle.Solid);
  368. }
  369. }
  370. public SizeF MeasureString(string text, Font drawFont)
  371. {
  372. return this.measureGraphics.MeasureString(text, drawFont);
  373. }
  374. public void Restore(IGraphicsState state)
  375. {
  376. if (state is HpglFGraphicsRendererState)
  377. {
  378. HpglFGraphicsRendererState gState = state as HpglFGraphicsRendererState;
  379. transformMatrix = gState.Matrix;
  380. }
  381. }
  382. public void RotateTransform(float angle)
  383. {
  384. transformMatrix.Rotate(angle);
  385. }
  386. public IGraphicsState Save()
  387. {
  388. return new HpglFGraphicsRendererState(transformMatrix);
  389. }
  390. public void TranslateTransform(float left, float top)
  391. {
  392. transformMatrix.Translate(left, top);
  393. }
  394. void IGraphics.SetClip(RectangleF textRect)
  395. {
  396. throw new NotImplementedException();
  397. }
  398. void IGraphics.DrawPath(Pen outlinePen, GraphicsPath path)
  399. {
  400. throw new NotImplementedException();
  401. }
  402. void IGraphics.DrawString(string text, Font font, Brush textBrush, RectangleF textRect, StringFormat format)
  403. {
  404. throw new NotImplementedException();
  405. }
  406. void IGraphics.FillEllipse(Brush brush, float x, float y, float dx, float dy)
  407. {
  408. throw new NotImplementedException();
  409. }
  410. void IGraphics.DrawImage(Image image, float x, float y)
  411. {
  412. throw new NotImplementedException();
  413. }
  414. void IGraphics.DrawLines(Pen pen, PointF[] pointFs)
  415. {
  416. throw new NotImplementedException();
  417. }
  418. void IGraphics.FillRectangle(Brush brush, RectangleF drawRect)
  419. {
  420. throw new NotImplementedException();
  421. }
  422. void IGraphics.DrawPolygon(Pen pen, PointF[] diaPoints)
  423. {
  424. throw new NotImplementedException();
  425. }
  426. void IGraphics.DrawRectangle(Pen borderPen, float left, float top, float width, float height)
  427. {
  428. throw new NotImplementedException();
  429. }
  430. void IGraphics.DrawString(string text, Font font, Brush brush, float left, float top, StringFormat format)
  431. {
  432. throw new NotImplementedException();
  433. }
  434. SizeF IGraphics.MeasureString(string text, Font font, SizeF size)
  435. {
  436. throw new NotImplementedException();
  437. }
  438. SizeF IGraphics.MeasureString(string text, Font font, int v, StringFormat format)
  439. {
  440. throw new NotImplementedException();
  441. }
  442. void IGraphics.MeasureString(string text, Font font, SizeF size, StringFormat format, out int charsFit, out int linesFit)
  443. {
  444. throw new NotImplementedException();
  445. }
  446. Region[] IGraphics.MeasureCharacterRanges(string text, Font font, RectangleF textRect, StringFormat format)
  447. {
  448. throw new NotImplementedException();
  449. }
  450. bool IGraphics.IsVisible(RectangleF objRect)
  451. {
  452. throw new NotImplementedException();
  453. }
  454. void IGraphics.ResetClip()
  455. {
  456. throw new NotImplementedException();
  457. }
  458. void IGraphics.ScaleTransform(float scaleX, float scaleY)
  459. {
  460. throw new NotImplementedException();
  461. }
  462. void IGraphics.DrawImage(Image image, RectangleF rect1, RectangleF rect2, GraphicsUnit unit)
  463. {
  464. throw new NotImplementedException();
  465. }
  466. void IGraphics.DrawImage(Image image, RectangleF rect)
  467. {
  468. throw new NotImplementedException();
  469. }
  470. void IGraphics.DrawImage(Image image, float x, float y, float width, float height)
  471. {
  472. throw new NotImplementedException();
  473. }
  474. void IGraphics.SetClip(RectangleF displayRect, CombineMode intersect)
  475. {
  476. throw new NotImplementedException();
  477. }
  478. void IGraphics.FillPolygon(Brush brush, Point[] points)
  479. {
  480. throw new NotImplementedException();
  481. }
  482. void IGraphics.DrawPolygon(Pen pen, Point[] points)
  483. {
  484. throw new NotImplementedException();
  485. }
  486. void IGraphics.MultiplyTransform(System.Drawing.Drawing2D.Matrix matrix, MatrixOrder prepend)
  487. {
  488. throw new NotImplementedException();
  489. }
  490. void IGraphics.DrawLine(Pen pen, PointF p1, PointF p2)
  491. {
  492. throw new NotImplementedException();
  493. }
  494. void IGraphics.DrawImage(Image image, PointF[] points)
  495. {
  496. throw new NotImplementedException();
  497. }
  498. void IGraphics.FillEllipse(Brush brush, RectangleF pointerCircle)
  499. {
  500. throw new NotImplementedException();
  501. }
  502. void IGraphics.DrawEllipse(Pen pen, RectangleF pointerCircle)
  503. {
  504. throw new NotImplementedException();
  505. }
  506. void IGraphics.DrawString(string s, Font font, Brush brush, PointF point, StringFormat format)
  507. {
  508. throw new NotImplementedException();
  509. }
  510. SizeF IGraphics.MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)
  511. {
  512. throw new NotImplementedException();
  513. }
  514. void IGraphics.DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
  515. {
  516. throw new NotImplementedException();
  517. }
  518. void IGraphics.DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs)
  519. {
  520. throw new NotImplementedException();
  521. }
  522. void IGraphics.DrawImageUnscaled(Image image, Rectangle rect)
  523. {
  524. throw new NotImplementedException();
  525. }
  526. void IGraphics.DrawArc(Pen pen, float x, float y, float dx, float dy, float v1, float v2)
  527. {
  528. throw new NotImplementedException();
  529. }
  530. void IGraphics.DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)
  531. {
  532. throw new NotImplementedException();
  533. }
  534. void IGraphics.DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
  535. {
  536. throw new NotImplementedException();
  537. }
  538. void IGraphics.DrawRectangle(Pen green, Rectangle rectangle)
  539. {
  540. throw new NotImplementedException();
  541. }
  542. void IGraphics.FillPie(Brush brush, float x, float y, float dx, float dy, float v1, float v2)
  543. {
  544. throw new NotImplementedException();
  545. }
  546. void IGraphics.FillRegion(Brush brush, Region region)
  547. {
  548. throw new NotImplementedException();
  549. }
  550. void IGraphics.SetClip(GraphicsPath path, CombineMode combineMode)
  551. {
  552. throw new NotImplementedException();
  553. }
  554. void IGraphics.FillAndDrawPath(Pen pen, Brush brush, GraphicsPath path)
  555. {
  556. FillPath(brush, path);
  557. ((IGraphics)this).DrawPath(pen, path);
  558. }
  559. void IGraphics.FillAndDrawEllipse(Pen pen, Brush brush, RectangleF rect)
  560. {
  561. throw new NotImplementedException();
  562. }
  563. void IGraphics.FillAndDrawEllipse(Pen pen, Brush brush, float left, float top, float width, float height)
  564. {
  565. throw new NotImplementedException();
  566. }
  567. void IGraphics.FillAndDrawPolygon(Pen pen, Brush brush, Point[] points)
  568. {
  569. throw new NotImplementedException();
  570. }
  571. void IGraphics.FillAndDrawPolygon(Pen pen, Brush brush, PointF[] points)
  572. {
  573. throw new NotImplementedException();
  574. }
  575. void IGraphics.FillAndDrawRectangle(Pen pen, Brush brush, float left, float top, float width, float height)
  576. {
  577. throw new NotImplementedException();
  578. }
  579. }
  580. public class HpglFGraphicsRendererState : IGraphicsState
  581. {
  582. private System.Drawing.Drawing2D.Matrix matrix;
  583. public System.Drawing.Drawing2D.Matrix Matrix
  584. {
  585. get
  586. {
  587. return matrix;
  588. }
  589. }
  590. public HpglFGraphicsRendererState(System.Drawing.Drawing2D.Matrix matrix)
  591. {
  592. this.matrix = matrix;
  593. }
  594. }
  595. }