12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697 |
- using PaintDotNet.Annotation;
- using PaintDotNet.Annotation.Command;
- using PaintDotNet.Annotation.Enum;
- using PaintDotNet.Annotation.Label;
- using PaintDotNet.Annotation.Measure;
- using PaintDotNet.Annotation.Other;
- using PaintDotNet.Base.DedicatedAnalysis.Inclusions.Model;
- using PaintDotNet.Base.SettingModel;
- using PaintDotNet.SystemLayer;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Drawing.Drawing2D;
- using System.Reflection;
- using System.Threading;
- using System.Windows.Forms;
- namespace PaintDotNet
- {
- /// <summary>
- /// 主面板
- /// </summary>
- public class DocumentStitchView : UserControl, ISurfaceBox
- {
- private IContainer components = null;
- // 中心画布
- public PanelEx panel;
- private static WeakReference<StitchSurface> doubleBufferSurfaceWeakRef = null;
- private StitchSurface doubleBufferSurface = null;
- /// <summary>
- /// 绘制线程
- /// </summary>
- private Threading.ThreadPool threadPool = new Threading.ThreadPool();
- private RenderContext renderContext;
- /// <summary>
- /// 为了保证图片绘制在画布中心
- /// 设置的偏移量
- /// </summary>
- private int offsetW = 0;
- private int offsetH = 0;
- private int offsetHalfW = 0;
- private int offsetHalfH = 0;
- /*private int offsetW = 300;
- private int offsetH = 150;
- private int offsetHalfW = 150;
- private int offsetHalfH = 75;*/
- /// <summary>
- /// 图层及文档信息
- /// </summary>
- private StitchDocument document;
- /// <summary>
- /// 图像内存块及其属性
- /// </summary>
- protected StitchSurface compositionSurface;
- /// <summary>
- /// 【标注、测量】list of draw objects
- /// </summary>
- private GraphicsList graphicsList;
- /// <summary>
- /// 【标注、测量、视场、其它】当前激活的工具
- /// </summary>
- public DrawToolType _activeTool;
- /// <summary>
- /// 工具的集合
- /// </summary>
- protected static Dictionary<DrawToolType, Type> tools;
- /// <summary>
- /// 初始化标记
- /// </summary>
- private bool initialized;
- /// <summary>
- /// 待渲染的列表
- /// </summary>
- private StitchSurfaceBoxRendererList rendererList;
- private StitchSurfaceBoxBaseRenderer baseRenderer;
- /// <summary>
- /// 窗体状态
- /// </summary>
- private FormWindowState oldWindowState = FormWindowState.Minimized;
- /// <summary>
- /// 缩放比例
- /// </summary>
- private ScaleFactor scaleFactor = new ScaleFactor(1, 1);
- /// <summary>
- /// 在toolPointer的工具下,是否绘制鼠标划选的矩形
- /// </summary>
- public bool drawRectangle = false;
- /// <summary>
- /// 在toolPointer的工具下,鼠标划选的矩形
- /// </summary>
- public Rectangle rectangle;
- public DocumentStitchView()
- {
- InitializeComponent();
- this.document = null;
- this.compositionSurface = null;
- this.panel.ScaleFactor = this.scaleFactor;
- this.panel.Paint += new PaintEventHandler(this.panelPaint);
- this.panel.MouseMove += new MouseEventHandler(this.MouseEvent_Move);
- this.panel.MouseDown += new MouseEventHandler(this.MouseEvent_Down);
- this.panel.MouseUp += new MouseEventHandler(this.MouseEvent_Up);
- this.panel.MouseClick += new MouseEventHandler(this.MouseEvent_Click);
- this.rendererList = new StitchSurfaceBoxRendererList(this.panel.Size, this.panel.Size);
- this.rendererList.Invalidated += new InvalidateEventHandler(Renderers_Invalidated);
- this.baseRenderer = new StitchSurfaceBoxBaseRenderer(this.rendererList);
- this.rendererList.Add(this.baseRenderer, false);
- this.initialized = true;
- }
- public new void Refresh()
- {
- base.Refresh();
- }
- //public OpenCvSharp.Mat OldMat
- //{
- // get
- // {
- // //备注:待调试->>200827 add by scc
- // if (this.CompositionSurface != null && CompositionSurface != null && CompositionSurface.mat != null)
- // return this.CompositionSurface.mat/*.Clone()*/;
- // //备注:待调试->>200827 add by scc
- // else if (this.CompositionSurface != null && CompositionSurface != null && CompositionSurface.Thumborigin != null)
- // return OpenCvSharp.Extensions.BitmapConverter.ToMat(this.CompositionSurface.Thumborigin/*CreateAliasedBitmap()*/);
- // else
- // return null;
- // }
- //}
- //public OpenCvSharp.Mat BoxMat
- //{
- // get
- // {
- // //备注:待调试
- // //if (this.AppWorkspace.ActiveDocumentWorkspace != null)
- // //{
- // return OpenCvSharp.Extensions.BitmapConverter.ToMat(this.BoxBitmap);
- // //}
- // }
- //}
- /// <summary>
- /// 初始化工具
- /// </summary>
- protected void InitToolsAndManager()
- {
- // 一是用于存储,二是用于调整层级
- GraphicsList = new GraphicsList(this);
- // init Tools
- //tools = new Tool[(int)DrawToolType.NumberOfDrawTools];
- if (tools != null) return;
- tools = new Dictionary<DrawToolType, Type>();
- tools.Add(DrawToolType.Pointer, typeof(ToolPointer));
- //其它
- //手型工具
- tools.Add(DrawToolType.MoveMode, typeof(PanTool));
- //图片裁剪
- tools.Add(DrawToolType.ImageCut, typeof(ImageCutTool));
- //null
- tools.Add(DrawToolType.NullTool, typeof(ToolNull));
- }
- [Browsable(false)]
- public override bool Focused
- {
- get
- {
- return base.Focused || panel.Focused;
- }
- }
- private void Renderers_Invalidated(object sender, InvalidateEventArgs e)
- {
- Rectangle rect = SurfaceToClient(e.InvalidRect);
- rect.Inflate(1, 1);
- Invalidate(rect);
- }
- public StitchSurface GetDoubleBuffer(Size size)
- {
- StitchSurface localDBSurface = null;
- Size oldSize = new Size(0, 0);
- // If we already have a double buffer surface reference, but if that surface
- // is already disposed then don't worry about it.
- if (this.doubleBufferSurface != null && this.doubleBufferSurface.IsDisposed)
- {
- oldSize = this.doubleBufferSurface.Size;
- this.doubleBufferSurface = null;
- }
- // If we already have a double buffer surface reference, but if that surface
- // is too small, then nuke it.
- if (this.doubleBufferSurface != null &&
- (this.doubleBufferSurface.Width < size.Width || this.doubleBufferSurface.Height < size.Height))
- {
- oldSize = this.doubleBufferSurface.Size;
- this.doubleBufferSurface.Dispose();
- this.doubleBufferSurface = null;
- doubleBufferSurfaceWeakRef = null;
- }
- // If we don't have a double buffer, then we'd better get one.
- if (this.doubleBufferSurface != null)
- {
- // Got one!
- localDBSurface = this.doubleBufferSurface;
- }
- else if (doubleBufferSurfaceWeakRef != null)
- {
- // First, try to get the one that's already shared amongst all SurfaceBox instances.
- localDBSurface = doubleBufferSurfaceWeakRef.Target;
- // If it's disposed, then forget about it.
- if (localDBSurface != null && localDBSurface.IsDisposed)
- {
- oldSize = localDBSurface.Size;
- localDBSurface = null;
- doubleBufferSurfaceWeakRef = null;
- }
- }
- // Make sure the surface is big enough.
- if (localDBSurface != null && (localDBSurface.Width < size.Width || localDBSurface.Height < size.Height))
- {
- oldSize = localDBSurface.Size;
- localDBSurface.Dispose();
- localDBSurface = null;
- doubleBufferSurfaceWeakRef = null;
- }
- // So, do we have a surface? If not then we'd better make one.
- if (localDBSurface == null)
- {
- Size newSize = new Size(Math.Max(size.Width, oldSize.Width), Math.Max(size.Height, oldSize.Height));
- localDBSurface = new StitchSurface(newSize, this.compositionSurface.PixelFormat == System.Drawing.Imaging.PixelFormat.Format24bppRgb ? 3 : 4);
- doubleBufferSurfaceWeakRef = new WeakReference<StitchSurface>(localDBSurface);
- }
- this.doubleBufferSurface = localDBSurface;
- StitchSurface window = localDBSurface.CreateWindow(0, 0, size.Width, size.Height);
- return window;
- }
- private class RenderContext
- {
- public StitchSurface[] windows;
- public Point[] offsets;
- public Rectangle[] rects;
- public DocumentStitchView owner;
- public WaitCallback waitCallback;
- public int TopIndex = 0;
- public void RenderThreadMethod1(object indexObject)
- {
- int index = (int)indexObject;
- this.owner.rendererList.topList[TopIndex].Render(windows[index], offsets[index]);
- //this.owner.rendererList.RenderTop(windows[index], offsets[index]);
- this.windows[index].Dispose();
- this.windows[index] = null;
- }
- public void RenderThreadMethod(object indexObject)
- {
- int index = (int)indexObject;
- this.owner.rendererList.list[0].Render(windows[index], offsets[index]);
- this.windows[index].Dispose();
- this.windows[index] = null;
- }
- }
- public unsafe void DrawArea(StitchRenderArgs ra, Point offset)
- {
- if (compositionSurface == null)
- {
- return;
- }
- if (renderContext == null || (renderContext.windows != null && renderContext.windows.Length != Processor.LogicalCpuCount))
- {
- renderContext = new RenderContext();
- //这里需要计算宽高
- renderContext.owner = this;
- renderContext.waitCallback = new WaitCallback(renderContext.RenderThreadMethod);
- renderContext.windows = new StitchSurface[Processor.LogicalCpuCount];
- renderContext.offsets = new Point[Processor.LogicalCpuCount];
- renderContext.rects = new Rectangle[Processor.LogicalCpuCount];
- //renderContext.owner = this;
- //renderContext.waitCallback = new WaitCallback(renderContext.RenderThreadMethod);
- //renderContext.windows = new StitchSurface[1];//Processor.LogicalCpuCount
- //renderContext.offsets = new Point[1];
- //renderContext.rects = new Rectangle[1];
- }
- Utility.SplitRectangle(ra.Bounds, renderContext.rects);
- for (int i = 0; i < renderContext.rects.Length; ++i)
- {
- if (renderContext.rects[i].Width > 0 && renderContext.rects[i].Height > 0)
- {
- renderContext.offsets[i] = new Point(renderContext.rects[i].X + offset.X, renderContext.rects[i].Y + offset.Y);
- renderContext.windows[i] = ra.Surface.CreateWindow(renderContext.rects[i]);
- }
- else
- {
- renderContext.windows[i] = null;
- }
- }
- for (int i = 0; i < renderContext.windows.Length; ++i)
- {
- if (renderContext.windows[i] != null)
- {
- this.threadPool.QueueUserWorkItem(renderContext.waitCallback, BoxedConstants.GetInt32(i));
- }
- }
- try
- {
- this.threadPool.Drain();
- }
- catch { }
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- this.panel.Select();
- }
- protected override void OnMouseWheel(MouseEventArgs e)
- {
- HandleMouseWheel(this, e);
- base.OnMouseWheel(e);
- }
- /// <summary>
- /// 鼠标滚轮事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected virtual void HandleMouseWheel(Control sender, MouseEventArgs e)
- {
- double docDelta = (double)e.Delta / this.ScaleFactor.Ratio;
- double oldX = this.DocumentScrollPositionF.X;
- double oldY = this.DocumentScrollPositionF.Y;
- double newX;
- double newY;
- if (Control.ModifierKeys == Keys.Shift)
- {
- this.panel.Response = false;
- // scroll horizontally
- newX = this.DocumentScrollPositionF.X - docDelta;
- newY = this.DocumentScrollPositionF.Y;
- }
- else if (Control.ModifierKeys == Keys.None)
- {
- this.panel.Response = true;
- // scroll vertically
- newX = this.DocumentScrollPositionF.X;
- newY = this.DocumentScrollPositionF.Y - docDelta;
- }
- else
- {
- this.panel.Response = false;
- // no change
- newX = this.DocumentScrollPositionF.X;
- newY = this.DocumentScrollPositionF.Y;
- }
- if (newX != oldX || newY != oldY)
- this.DocumentScrollPositionF = new PointF((float)newX, (float)newY);
- }
- /// <summary>
- /// Get or set upper left of scroll location in document coordinates.
- /// </summary>
- [Browsable(false)]
- public PointF DocumentScrollPositionF
- {
- get
- {
- if (this.panel == null)
- {
- return PointF.Empty;
- }
- else
- {
- return this.panel.ScrollPosition;
- //return VisibleDocumentRectangleF.Location;
- }
- }
- set
- {
- if (panel == null)
- {
- return;
- }
- else
- {
- this.panel.ScrollPosition = new Point((int)value.X, (int)value.Y);
- }
- }
- }
- public Point PanelScrollPosition
- {
- get
- {
- return this.panel.ScrollPosition;
- }
- set
- {
- this.panel.ScrollPosition = value;
- }
- }
- [Browsable(false)]
- public PointF DocumentCenterPointF
- {
- get
- {
- RectangleF vsb = VisibleDocumentRectangleF;
- PointF centerPt = new PointF((vsb.Left + vsb.Right) / 2, (vsb.Top + vsb.Bottom) / 2);
- return centerPt;
- }
- set
- {
- RectangleF vsb = VisibleDocumentRectangleF;
- PointF newCornerPt = new PointF(value.X - (vsb.Width / 2), value.Y - (vsb.Height / 2));
- this.DocumentScrollPositionF = newCornerPt;
- }
- }
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (this.components != null)
- {
- this.components.Dispose();
- this.components = null;
- }
- if (this.compositionSurface != null)
- {
- this.compositionSurface.Dispose();
- this.compositionSurface = null;
- }
- }
- base.Dispose(disposing);
- }
- /// <summary>
- /// 缩放比例改变事件
- /// </summary>
- public event EventHandler ScaleFactorChanged;
- protected virtual void OnScaleFactorChanged()
- {
- if (ScaleFactorChanged != null)
- {
- ScaleFactorChanged(this, EventArgs.Empty);
- }
- }
- private double GetZoomInFactorEpsilon()
- {
- double ratio = this.ScaleFactor.Ratio;
- return (ratio + 0.01) / ratio;
- }
- private double GetZoomOutFactorEpsilon()
- {
- double ratio = this.ScaleFactor.Ratio;
- return (ratio - 0.01) / ratio;
- }
- public virtual void ZoomIn(double factor)
- {
- Do.TryBool(() => ZoomInImpl(factor));
- }
- private void ZoomInImpl(double factor)
- {
- PointF centerPt = this.DocumentCenterPointF;
- ScaleFactor oldSF = this.ScaleFactor;
- ScaleFactor newSF = this.ScaleFactor;
- int countdown = 3;
- // At a minimum we want to increase the size of visible document by 1 pixel
- // Figure out what the ratio of ourSize : ourSize+1 is, and start out with that
- double zoomInEps = GetZoomInFactorEpsilon();
- double desiredFactor = Math.Max(factor, zoomInEps);
- double newFactor = desiredFactor;
- // Keep setting the ScaleFactor until it actually 'sticks'
- // Important for certain image sizes where not all zoom levels create distinct
- // screen sizes
- do
- {
- newSF = ScaleFactor.FromDouble(newSF.Ratio * newFactor);
- this.ScaleFactor = newSF;
- --countdown;
- newFactor *= 1.10;
- } while (this.ScaleFactor == oldSF && countdown > 0);
- this.DocumentCenterPointF = centerPt;
- }
- public virtual void ZoomIn()
- {
- Do.TryBool(ZoomInImpl);
- }
- private void ZoomInImpl()
- {
- PointF centerPt = this.DocumentCenterPointF;
- ScaleFactor oldSF = this.ScaleFactor;
- ScaleFactor newSF = this.ScaleFactor;
- int countdown = ScaleFactor.PresetValues.Length;
- // Keep setting the ScaleFactor until it actually 'sticks'
- // Important for certain image sizes where not all zoom levels create distinct
- // screen sizes
- do
- {
- newSF = newSF.GetNextLarger();
- this.ScaleFactor = newSF;
- --countdown;
- } while (this.ScaleFactor == oldSF && countdown > 0);
- this.DocumentCenterPointF = centerPt;
- }
- public virtual void ZoomOut(double factor)
- {
- Do.TryBool(() => ZoomOutImpl(factor));
- }
- private void ZoomOutImpl(double factor)
- {
- PointF centerPt = this.DocumentCenterPointF;
- ScaleFactor oldSF = this.ScaleFactor;
- ScaleFactor newSF = this.ScaleFactor;
- int countdown = 3;
- // At a minimum we want to decrease the size of visible document by 1 pixel (without dividing by zero of course)
- // Figure out what the ratio of ourSize : ourSize-1 is, and start out with that
- double zoomOutEps = GetZoomOutFactorEpsilon();
- double factorRecip = 1.0 / factor;
- double desiredFactor = Math.Min(factorRecip, zoomOutEps);
- double newFactor = desiredFactor;
- // Keep setting the ScaleFactor until it actually 'sticks'
- // Important for certain image sizes where not all zoom levels create distinct
- // screen sizes
- do
- {
- newSF = ScaleFactor.FromDouble(newSF.Ratio * newFactor);
- this.ScaleFactor = newSF;
- --countdown;
- newFactor *= 0.9;
- } while (this.ScaleFactor == oldSF && countdown > 0);
- this.DocumentCenterPointF = centerPt;
- }
- public virtual void ZoomOut()
- {
- Do.TryBool(ZoomOutImpl);
- }
- private void ZoomOutImpl()
- {
- PointF centerPt = this.DocumentCenterPointF;
- ScaleFactor oldSF = this.ScaleFactor;
- ScaleFactor newSF = this.ScaleFactor;
- int countdown = ScaleFactor.PresetValues.Length;
- // Keep setting the ScaleFactor until it actually 'sticks'
- // Important for certain image sizes where not all zoom levels create distinct
- // screen sizes
- do
- {
- newSF = newSF.GetNextSmaller();
- this.ScaleFactor = newSF;
- --countdown;
- } while (this.ScaleFactor == oldSF && countdown > 0);
- this.DocumentCenterPointF = centerPt;
- }
- [Browsable(false)]
- public ScaleFactor ScaleFactor
- {
- get
- {
- return this.scaleFactor;
- }
- set
- {
- UI.SuspendControlPainting(this);
- ScaleFactor newValue = ScaleFactor.Min(value, ScaleFactor.MaxValue);
- if (newValue == this.scaleFactor &&
- this.scaleFactor == ScaleFactor.OneToOne)
- {
- // this space intentionally left blank
- }
- else
- {
- //RectangleF visibleRect = this.VisibleDocumentRectangleF;
- //ScaleFactor oldSF = scaleFactor;
- scaleFactor = newValue;
- //// This value is used later below to re-center the document on screen
- //PointF centerPt = new PointF(visibleRect.X + visibleRect.Width / 2,
- // visibleRect.Y + visibleRect.Height / 2);
- if (compositionSurface != null)
- {
- Rectangle rc = this.panel.ClientRectangle;
- int width = (int)(this.compositionSurface.Width * this.scaleFactor.Ratio);
- int height = (int)(this.compositionSurface.Height * this.scaleFactor.Ratio);
- if (rc.Width < width || rc.Height < height)
- this.panel.AutoScrollMinSize = new Size((int)((this.compositionSurface.StitchWidth) * scaleFactor.Ratio) + offsetW, (int)((this.compositionSurface.StitchHeight) * scaleFactor.Ratio) + offsetH);
- else
- this.panel.AutoScrollMinSize = new Size((int)((this.compositionSurface.StitchWidth) * scaleFactor.Ratio), (int)((this.compositionSurface.StitchHeight) * scaleFactor.Ratio));
- this.panel.ScaleFactor = this.scaleFactor;
- }
- //// re center ourself
- //RectangleF visibleRect2 = this.VisibleDocumentRectangleF;
- //RecenterView(centerPt);
- }
- this.OnResize(EventArgs.Empty);
- this.OnScaleFactorChanged();
- if (compositionSurface != null)
- this.rendererList.DestinationSize = this.scaleFactor.ScaleSize(compositionSurface.Size);
- UI.ResumeControlPainting(this);
- Invalidate(true);
- }
- }
- /// <summary>
- /// Returns a rectangle for the bounding rectangle of what is currently visible on screen,
- /// in document coordinates.
- /// </summary>
- [Browsable(false)]
- public RectangleF VisibleDocumentRectangleF
- {
- get
- {
- Rectangle panelRect = this.panel.RectangleToScreen(this.panel.ClientRectangle); // screen coords coords
- Rectangle docScreenRect = panelRect; // screen coords
- Rectangle docClientRect = RectangleToClient(docScreenRect);
- RectangleF docDocRectF = ClientToDocument(docClientRect);
- return docDocRectF;
- }
- }
- public Rectangle PanelClientRectangle
- {
- get
- {
- return panel.ClientRectangle;
- }
- }
- public int SurfaceScrollableWidth
- {
- get
- {
- return (int)(this.compositionSurface.Width * this.scaleFactor.Ratio);
- }
- }
- public int SurfaceScrollableHeight
- {
- get
- {
- return (int)(this.compositionSurface.Height * this.scaleFactor.Ratio);
- }
- }
- public double ScaleRatio
- {
- get
- {
- return this.scaleFactor.Ratio;
- }
- }
- /// <summary>
- /// Returns a rectangle in <b>screen</b> coordinates that represents the space taken up
- /// by the document that is visible on screen.
- /// </summary>
- [Browsable(false)]
- public Rectangle VisibleDocumentBounds
- {
- get
- {
- // convert coordinates: document -> client -> screen
- return RectangleToScreen(Utility.RoundRectangle(DocumentToClient(VisibleDocumentRectangleF)));
- }
- }
- public Rectangle ClientRectangleMax
- {
- get
- {
- return RectangleToClient(this.panel.RectangleToScreen(this.panel.Bounds));
- }
- }
- /// <summary>
- /// Gets or sets the Document that is shown through this instance of DocumentStitchView.
- /// </summary>
- /// <remarks>
- /// This property is thread safe and may be called from a non-UI thread. However,
- /// if the setter is called from a non-UI thread, then that thread will block as
- /// the call is marshaled to the UI thread.
- /// </remarks>
- [Browsable(false)]
- public StitchDocument StitchDocument
- {
- get
- {
- return document;
- }
- set
- {
- if (InvokeRequired)
- {
- this.Invoke(new Procedure<StitchDocument, bool>(DocumentSetImpl), new object[2] { value, true });
- }
- else
- {
- DocumentSetImpl(value, true);
- }
- }
- }
- private void DocumentSetImpl(StitchDocument value, bool toedit)
- {
- this.DoubleBuffered = true;
- SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
- PointF dspf = DocumentScrollPositionF;
- try
- {
- if (this.document != null)
- {
- this.document.Invalidated -= Document_Invalidated;
- }
- this.document = value;
- if (document != null)
- {
- if (this.compositionSurface != null &&
- this.compositionSurface.Size != document.Size)
- {
- this.compositionSurface.Dispose();
- this.compositionSurface = null;
- }
- //if (this.compositionSurface == null)
- //{
- //this.compositionSurface = new StitchSurface(Document.Size);
- this.compositionSurface = document.surface;//((BitmapLayer)(document.Layers[0])).Surface;
- this.baseRenderer.Source = document.surface; //((BitmapLayer)(document.Layers[0])).Surface;
- if (this.compositionSurface != null)
- {
- // Maintain the scalefactor
- /*this.Size = this.scaleFactor.ScaleSize(compositionSurface.Size);*/
- this.rendererList.SourceSize = this.compositionSurface.Size;
- this.rendererList.DestinationSize = this.Size;
- }
- this.document.Invalidated += Document_Invalidated;
- }
- Invalidate(true);
- this.OnResize(EventArgs.Empty);
- }
- finally
- {
- }
- DocumentScrollPositionF = dspf;
- }
- public bool PanelAutoScroll
- {
- get
- {
- return panel.AutoScroll;
- }
- set
- {
- if (panel.AutoScroll != value)
- {
- panel.AutoScroll = value;
- }
- }
- }
- public DrawToolType ActiveTool
- {
- get => _activeTool;
- set
- {
- if (!tools.ContainsKey(value)) return;
- tools[_activeTool].InvokeMember("beginWithNewObject",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[0] { });
- _activeTool = value;
- }
- }
- public GraphicsList GraphicsList
- {
- get
- {
- return graphicsList;
- }
- set
- {
- graphicsList = value;
- if (this.GraphicsList != null)
- {
- this.Invalidate();
- }
- }
- }
- public bool DrawRectangleFlag
- {
- get
- {
- return this.drawRectangle;
- }
- set
- {
- this.drawRectangle = value;
- }
- }
- public Rectangle DrawRectangle
- {
- get
- {
- return this.rectangle;
- }
- set
- {
- this.rectangle = value;
- }
- }
- public bool ViewMoveOnMouseLeftDoubleClickEnable { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
- public int ToolNumber { set => throw new NotImplementedException(); }
- public LabelStyleModel.DrawAnalysisModel AnalysisStyleModel { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
- private void DoLayout()
- {
- this.UpdateImgLocation();
- }
- private void Document_Invalidated(object sender, InvalidateEventArgs e)
- {
- if (this.ScaleFactor == ScaleFactor.OneToOne)
- {
- this.panel.Invalidate(e.InvalidRect);
- }
- else
- {
- Rectangle inflatedInvalidRect = Rectangle.Inflate(e.InvalidRect, 1, 1);
- Rectangle clientRect = this.panel.SurfaceToClient(inflatedInvalidRect);
- Rectangle inflatedClientRect = Rectangle.Inflate(clientRect, 1, 1);
- this.panel.Invalidate(inflatedClientRect);
- }
- }
- ///// <summary>
- ///// 重新设置中心点
- ///// </summary>
- ///// <param name="newCenter"></param>
- //public void RecenterView(PointF newCenter)
- //{
- // RectangleF visibleRect = VisibleDocumentRectangleF;
- // PointF cornerPt = new PointF(
- // newCenter.X - (visibleRect.Width / 2),
- // newCenter.Y - (visibleRect.Height / 2));
- // this.DocumentScrollPositionF = cornerPt;
- //}
- #region DocimentView的子控件的事件
- private void Panel_KeyDown(object sender, KeyEventArgs e)
- {
- if (!e.Handled)
- {
- PointF oldPt = this.DocumentScrollPositionF;
- PointF newPt = oldPt;
- RectangleF vdr = VisibleDocumentRectangleF;
- switch (e.KeyData)
- {
- case Keys.Next:
- newPt.Y += vdr.Height;
- break;
- case (Keys.Next | Keys.Shift):
- newPt.X += vdr.Width;
- break;
- case Keys.Prior:
- newPt.Y -= vdr.Height;
- break;
- case (Keys.Prior | Keys.Shift):
- newPt.X -= vdr.Width;
- break;
- case Keys.Home:
- if (oldPt.X == 0)
- {
- newPt.Y = 0;
- }
- else
- {
- newPt.X = 0;
- }
- break;
- case Keys.End:
- if (vdr.Right < this.document.Width - 1)
- {
- newPt.X = this.document.Width;
- }
- else
- {
- newPt.Y = this.document.Height;
- }
- break;
- default:
- break;
- }
- if (newPt != oldPt)
- {
- DocumentScrollPositionF = newPt;
- e.Handled = true;
- }
- }
- }
- private void Panel_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
- {
- OnScroll(e);
- }
- /// <summary>
- /// 鼠标按下事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected virtual void MouseEvent_Down(object sender, MouseEventArgs e)
- {
- if (tools != null)
- {
- //tools[activeTool].OnMouseDown(this, e);
- tools[_activeTool].InvokeMember("OnMouseDown",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[2] { this, e });
- }
- }
- public void MouseEvent_Del(object sender, MouseEventArgs e)
- {
- try
- {
- tools[_activeTool].InvokeMember("beginWithNewObject",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[0] { });
- tools[0].InvokeMember("OnDelKeyDown",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[2] { this, e });
- }
- catch
- {
- }
- }
- /// <summary>
- /// 鼠标移动事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected virtual void MouseEvent_Move(object sender, MouseEventArgs e)
- {
- //
- // 处理标注测量
- //
- if (!initialized)
- return;
- if (e.Button == MouseButtons.Left || e.Button == MouseButtons.None)
- if (tools != null)
- {
- tools[_activeTool].InvokeMember("OnMouseMove",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[2] { this, e });
- }
- else
- this.Cursor = Cursors.Default;
- }
- /// <summary>
- /// 鼠标抬起事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MouseEvent_Up(object sender, MouseEventArgs e)
- {
- if (tools != null)
- {
- if (e.Button == MouseButtons.Left)
- tools[_activeTool].InvokeMember("OnMouseUp",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[2] { this, e });
- }
- }
- /// <summary>
- /// 鼠标单击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MouseEvent_Click(object sender, MouseEventArgs e)
- {
- if (tools != null)
- {
- tools[_activeTool].InvokeMember("OnMouseClick",
- BindingFlags.Public |
- BindingFlags.Static |
- BindingFlags.InvokeMethod,
- null,
- null,
- new object[2] { this, e });
- }
- }
- /// 绘制事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private unsafe void panelPaint(object sender, PaintEventArgs e)
- {
- if (compositionSurface != null)
- {
- // 以下是计算绘制图片的位置和大小并绘制图片
- Rectangle rc = this.panel.ClientRectangle;
- int width = (int)(this.compositionSurface.Width * this.scaleFactor.Ratio);
- int height = (int)(this.compositionSurface.Height * this.scaleFactor.Ratio);
- int x = (rc.Width < width) ? this.panel.AutoScrollPosition.X + offsetHalfW : (rc.Width - width) / 2;
- int y = (rc.Height < height) ? this.panel.AutoScrollPosition.Y + offsetHalfH : (rc.Height - height) / 2;
- //第四个版本,只绘制当前需要显示的大小的图片
- //if (this.compositionSurface.Bitmap != null)
- if (this.compositionSurface.CreateAliasedBitmap() != null)
- {
- using (StitchSurface doubleBuffer = GetDoubleBuffer(new Size((rc.Width < width) ? rc.Width : width, (rc.Height < height) ? rc.Height : height)))
- {
- try
- {
- using (StitchRenderArgs renderArgs = new StitchRenderArgs(doubleBuffer))
- {
- DrawArea(renderArgs, new Point((rc.Width < width) ? -x : 0, (rc.Height < height) ? -y : 0));
- if (m_center)
- {
- e.Graphics.DrawImage(doubleBuffer.CreateAliasedBitmap(),
- (rc.Width < width) ? 0 : (rc.Width - width) / 2,
- (rc.Height < height) ? 0 : (rc.Height - height) / 2,
- (rc.Width < width) ? rc.Width : width, (rc.Height < height) ? rc.Height : height);
- }
- else
- {
- e.Graphics.DrawImage(doubleBuffer.CreateAliasedBitmap(),
- m_pLeft,
- m_pTop,
- (rc.Width < width) ? rc.Width : width, (rc.Height < height) ? rc.Height : height);
- }
- }
- }
- catch { }
- }
- }
- //
- // 以下是绘制网格、标注、测量、视场等开始
- //
- e.Graphics.TranslateTransform(x, y);
- e.Graphics.ScaleTransform((float)this.scaleFactor.Ratio, (float)this.scaleFactor.Ratio);
- //
- // 以下是绘制标注、测量、视场
- //
- if (graphicsList != null)
- {
- var drawObject = graphicsList[0];
- if (!(drawObject is MeasureRectangle))
- { }//graphicsList.Draw(e.Graphics);
- else//pen.DashStyle = DashStyle.Solid;
- e.Graphics.DrawRectangle(new Pen(Color.Green, 14), drawObject.Rectangle.X, drawObject.Rectangle.Y, drawObject.Rectangle.Width, drawObject.Rectangle.Height);
- }
- e.Graphics.ScaleTransform(1 / (float)this.scaleFactor.Ratio, 1 / (float)this.scaleFactor.Ratio);
- e.Graphics.TranslateTransform(-x, -y);
- }
- }
- #endregion
- ///// <summary>
- ///// 获取panel可见位置的图片
- ///// </summary>
- ///// <returns></returns>
- //public Bitmap GetClientRangePic()
- //{
- #region DocumentStitchView的事件
- protected override void OnLayout(LayoutEventArgs e)
- {
- DoLayout();
- base.OnLayout(e);
- }
- /// <summary>
- /// 让画布获取焦点
- /// </summary>
- public new void Focus()
- {
- this.panel.Focus();
- }
- protected override void OnResize(EventArgs e)
- {
- // enable or disable timer: no sense drawing selection if we're minimized
- Form parentForm = ParentForm;
- if (parentForm != null)
- {
- if (parentForm.WindowState != this.oldWindowState)
- {
- PerformLayout();
- }
- this.oldWindowState = parentForm.WindowState;
- }
- base.OnResize(e);
- DoLayout();
- }
- #endregion
- #region 坐标转换相关方法
- public Point MouseToDocument(Control sender, Point mouse)
- {
- Point screenPoint = sender.PointToScreen(mouse);
- Point sbClient = this.panel.PointToClient(screenPoint);
- Point docPoint = Point.Truncate(this.panel.ClientToSurface(sbClient));
- return docPoint;
- }
- /// <summary>
- /// Converts a rectangle from the Windows Forms "client" coordinate space into the Document
- /// coordinate space.
- /// </summary>
- /// <param name="clientPt">A Rectangle that is in client coordinates.</param>
- /// <returns>A Rectangle that is in Document coordinates.</returns>
- public RectangleF ClientToDocument(Rectangle clientRect)
- {
- Rectangle screen = RectangleToScreen(clientRect);
- screen.X = screen.X + offsetW;
- screen.Y = screen.Y + offsetH;
- Rectangle sbClient = this.panel.RectangleToClient(screen);
- return this.panel.ClientToSurface((RectangleF)sbClient);
- }
- /// <summary>
- /// Converts a rectangle from Document coordinate space into the Windows Forms "client"
- /// coordinate space.
- /// </summary>
- /// <param name="clientPt">A Rectangle that is in Document coordinates.</param>
- /// <returns>A Rectangle that is in client coordinates.</returns>
- public RectangleF DocumentToClient(RectangleF documentRect)
- {
- RectangleF sbClient = this.panel.SurfaceToClient(documentRect);
- Rectangle screen = this.panel.RectangleToScreen(Utility.RoundRectangle(sbClient));
- return RectangleToClient(screen);
- }
- public Rectangle SurfaceToClient(Rectangle surfaceRect)
- {
- return new Rectangle(SurfaceToClient(surfaceRect.Location), SurfaceToClient(surfaceRect.Size));
- }
- public Point SurfaceToClient(Point surfacePt)
- {
- return ScaleFactor.ScalePoint(surfacePt);
- }
- public Size SurfaceToClient(Size surfaceSize)
- {
- return Size.Round(SurfaceToClient((SizeF)surfaceSize));
- }
- public SizeF SurfaceToClient(SizeF surfaceSize)
- {
- return ScaleFactor.ScaleSize(surfaceSize);
- }
- #endregion
- #region 初始化控件
- private void InitializeComponent()
- {
- this.components = new Container();
- this.panel = new PanelEx();
- this.panel.SuspendLayout();
- this.SuspendLayout();
- //
- // panel
- //
- this.panel.AutoScroll = true;
- this.panel.Dock = DockStyle.Fill;
- this.panel.HideHScroll = false;
- this.panel.HideVScroll = false;
- this.panel.Location = new Point(16, 16);
- this.panel.Name = "panel";
- this.panel.ScrollPosition = new Point(0, 0);
- this.panel.Size = new Size(368, 304);
- this.panel.TabIndex = 5;
- this.panel.AllowDrop = false;
- this.panel.Scroll += new ScrollEventHandler(this.Panel_Scroll);
- this.panel.KeyDown += new KeyEventHandler(Panel_KeyDown);
- //
- // DocumentStitchView
- //
- this.Controls.Add(this.panel);
- this.Name = "DocumentStitchView";
- this.Size = new System.Drawing.Size(384, 320);
- this.panel.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- #endregion
- #region 设定图片位置
- // add by maxb 20200716
- /// <summary>
- /// 图片位置坐标
- /// </summary>
- private bool m_center = true;
- private int m_pTop = 0;
- private int m_pLeft = 0;
- private int m_initTop = 0;
- private int m_initLeft = 0;
- private void UpdateImgLocation()
- {
- if (!m_center)
- {
- //Console.WriteLine("m_pLeft: " + m_initLeft + " Ratio:" + this.scaleFactor.Ratio);
- m_pLeft = 16 + (int)(m_initLeft * this.scaleFactor.Ratio);
- m_pTop = 16 + (int)(m_initTop * this.scaleFactor.Ratio);
- //Console.WriteLine("Location: " + m_pLeft + " " + m_pTop);
- }
- }
- public RectangleF GetVisibleDocumentRectangleF()
- {
- return this.VisibleDocumentRectangleF;
- //return this.AppWorkspaceTop.GetVisibleDocumentRectangleF();
- }
- public SizeF GetDocumentSize()
- {
- if (this.document != null)
- return this.document.Size;
- else
- return new SizeF(0, 0);
- //return this.AppWorkspaceTop.GetDocumentSize();
- }
- public void AddCommandToHistory(Command c)
- {
- throw new NotImplementedException();
- }
- public void SetDirty()
- {
- throw new NotImplementedException();
- }
- /// <summary>
- /// 获取未缩放的坐标点
- /// </summary>
- /// <param name="point"></param>
- /// <returns></returns>
- public Point GetScalePoint(PointF point)
- {
- Rectangle rc = this.panel.ClientRectangle;
- int width = this.compositionSurface == null ? 800 : (int)(this.compositionSurface.Width * this.scaleFactor.Ratio);
- int height = this.compositionSurface == null ? 600 : (int)(this.compositionSurface.Height * this.scaleFactor.Ratio);
- int x = (rc.Width < width) ? this.panel.AutoScrollPosition.X + offsetHalfW : (rc.Width - width) / 2;
- int y = (rc.Height < height) ? this.panel.AutoScrollPosition.Y + offsetHalfH : (rc.Height - height) / 2;
- return new Point(
- (int)((point.X - x) / this.scaleFactor.Ratio),
- (int)((point.Y - y) / this.scaleFactor.Ratio)
- );
- //return this.scaleFactor.UnscalePoint(location);
- }
- public Point GetCalcOriginPoint()
- {
- throw new NotImplementedException();
- }
- public int UnscaleScalar(int deltaX)
- {
- throw new NotImplementedException();
- }
- public PointF GetDocumentScrollPositionF()
- {
- return this.DocumentScrollPositionF;
- //return this.AppWorkspaceTop.GetDocumentScrollPositionF();
- }
- public void SetDocumentScrollPositionF(PointF newScrollPos)
- {
- Point sbClient = Point.Round(newScrollPos);
- if (this.panel.AutoScrollPosition != new Point(-sbClient.X, -sbClient.Y))
- {
- this.panel.AutoScrollPosition = sbClient;
- }
- }
- public PointF DocumentToClient(PointF pointF)
- {
- throw new NotImplementedException();
- }
- public string[] GetPxPerUnit()
- {
- throw new NotImplementedException();
- }
- public Dictionary<int, string> GetUnitsDictionary()
- {
- throw new NotImplementedException();
- }
- public Dictionary<int, string> GetUnitSymbolsDictionary()
- {
- throw new NotImplementedException();
- }
- public CombineMode GetCombineMode()
- {
- throw new NotImplementedException();
- }
- public void SetMouseStatus(bool status)
- {
- throw new NotImplementedException();
- }
- public bool GetMouseStatus()
- {
- throw new NotImplementedException();
- }
- public Dictionary<DrawToolType, Type> GetTools()
- {
- throw new NotImplementedException();
- }
- public bool ContinuousDrawingLabel()
- {
- throw new NotImplementedException();
- }
- public void SetContinuousDrawingLabel(bool v)
- {
- throw new NotImplementedException();
- }
- public bool ContinuousDrawingMeasure()
- {
- throw new NotImplementedException();
- }
- public void SetContinuousDrawingMeasure(bool v)
- {
- throw new NotImplementedException();
- }
- public void ResetUndoManager()
- {
- throw new NotImplementedException();
- }
- public LabelStyleModel GetLabelStyleModel()
- {
- throw new NotImplementedException();
- }
- public MeasureStyleModel GetMeasureStyleModel()
- {
- return new MeasureStyleModel();// throw new NotImplementedException();
- }
- public WatermarkModel GetWatermarkModel()
- {
- throw new NotImplementedException();
- }
- public WorkTypeStyleModel GetWorkTypeStyleModel()
- {
- throw new NotImplementedException();
- }
- public RulerModel GetRulerStyleModel()
- {
- throw new NotImplementedException();
- }
- public Dictionary<MeasurementUnit, double> getMeasureInfo()
- {
- throw new NotImplementedException();
- }
- public MeasurementUnit GetMeasurementUnit()
- {
- throw new NotImplementedException();
- }
- public decimal GetGainMultiple()
- {
- throw new NotImplementedException();
- }
- public decimal GetMic_Rulers()
- {
- throw new NotImplementedException();
- }
- public void RefreshLabelListDialog()
- {
- throw new NotImplementedException();
- }
- public void UpdateContinueNum()
- {
- throw new NotImplementedException();
- }
- public bool ContinuousBinaryAction()
- {
- throw new NotImplementedException();
- }
- public void BinaryActionExtract(PointF point)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionChoise(PointF point)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionChoiseRectangle(RectangleF rectangle)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionChoiseOval(RectangleF rectangle)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionChoisePolygon(List<PointF> points)
- {
- throw new NotImplementedException();
- }
- public int GetSegmentationWidth()
- {
- throw new NotImplementedException();
- }
- public void BinaryActionSplitLine(PointF start, PointF end)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionSplitOval(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public int GetConnectionWidth()
- {
- throw new NotImplementedException();
- }
- public void BinaryActionConnectionLine(PointF start, PointF end)
- {
- throw new NotImplementedException();
- }
- public void BinaryConnectionOval(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionDelete(PointF point)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionDelete(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionDelete(List<PointF> points)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionDeleteOval(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionAddOval(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionAddRectangle(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void BinaryActionAddPolygon(List<PointF> points)
- {
- throw new NotImplementedException();
- }
- public void PPhaseActionRectangle(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public void PPhaseActionPolygon(List<PointF> points)
- {
- throw new NotImplementedException();
- }
- public void PPhaseActionOval(RectangleF rect)
- {
- throw new NotImplementedException();
- }
- public PointF GetRulerPointInPanel(PointF point)
- {
- throw new NotImplementedException();
- }
- public PointF ScalePointToRulerPoint(PointF point)
- {
- throw new NotImplementedException();
- }
- public bool ActualSize()
- {
- throw new NotImplementedException();
- }
- public bool SuitableSize()
- {
- throw new NotImplementedException();
- }
- public bool SuitableWidth()
- {
- throw new NotImplementedException();
- }
- public bool SuitableHeight()
- {
- throw new NotImplementedException();
- }
- public bool LockZoom()
- {
- throw new NotImplementedException();
- }
- public bool FixedMultiple()
- {
- throw new NotImplementedException();
- }
- public bool MergeFieldOfView()
- {
- throw new NotImplementedException();
- }
- public bool DeleteFieldOfView()
- {
- throw new NotImplementedException();
- }
- public Inclusion GetInclusion()
- {
- throw new NotImplementedException();
- }
- #endregion
- }
- }
|