12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using PaintDotNet.Annotation.Enum;
- using PaintDotNet.Base.DedicatedAnalysis.Porosity.Model;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PaintDotNet.Annotation.DedicatedAnalysis
- {
- public class PorosityDrawObject : DedicatedAnalysisDrawObject
- {
- public Porositys porositys;
- public PorosityDrawObject(ISurfaceBox surfaceBox, Porositys porositys) : base(surfaceBox)
- {
- this.drawToolType = DrawToolType.PorositySelect;
- this.porositys = porositys;
- }
- public override void Draw(Graphics g)
- {
- Drawing(g);
- }
- public override DrawObject Clone()
- {
- return new PorosityDrawObject(this.ISurfaceBox, this.porositys);
- }
- public override RectangleF GetBoundingBox()
- {
- throw new NotImplementedException();
- }
- public override void DrawTracker(Graphics g)
- {
- Drawing(g);
- }
- private void Drawing(Graphics g)
- {
- //foreach (Particle particle in this.porositys.particles)
- //{
- // g.DrawRectangle(new Pen(Color.Red), particle.rectProfile.X, particle.rectProfile.Y, particle.rectProfile.Width, particle.rectProfile.Height);
- // // 填充夹杂物
- // g.FillPolygon(new SolidBrush(Color.FromArgb(this.porositys.type.showColor)), particle.points2);
- //}
- //g.DrawRectangle(new Pen(Color.Blue, Selected ? 10 : 1), this.porositys.rectProfile.X, this.porositys.rectProfile.Y, this.porositys.rectProfile.Width, this.porositys.rectProfile.Height);
- //g.DrawEllipse(new Pen(Color.Green), this.porositys.rectProfile.X, this.porositys.rectProfile.Y, this.porositys.rectProfile.Width, this.porositys.rectProfile.Height);
- //Font type = new Font(System.Drawing.SystemFonts.DefaultFont.FontFamily, (float)(this.porositys.pixelLength / 10), System.Drawing.SystemFonts.DefaultFont.Style);
- //Font chemicalCharacteristics = new Font(type.FontFamily, type.Size / 2);
- //g.DrawString("", type, new SolidBrush(Color.Blue), this.porositys.rectProfile.Right, this.porositys.rectProfile.Bottom - type.Size);
- //g.DrawString(this.porositys.chemicalCharacteristics, chemicalCharacteristics, new SolidBrush(Color.Blue), this.porositys.rectProfile.Right + (this.porositys.type.type.Length * type.Size), this.porositys.rectProfile.Bottom - chemicalCharacteristics.Size);
- }
- }
- }
|