HpglGraphicsRenderer.cs 23 KB

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