Here are the examples of the csharp api class System.Drawing.Rectangle.Intersect(System.Drawing.Rectangle) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
129 Examples
0
1. Example
Project: MapleShark
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
2. Example
Project: dockpanelsuite
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; /n ..... /n //View Source file for more details /n }
0
3. Example
Project: ArnoldSimulator
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; /n ..... /n //View Source file for more details /n }
0
4. Example
Project: lua-tilde
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
5. Example
Project: Nexus-Mod-Manager
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; /n ..... /n //View Source file for more details /n }
0
6. Example
Project: partcover.net4
Source File: TextControl.cs
Source File: TextControl.cs
protected override void OnPaint(PaintEventArgs e) { var clip = e.ClipRectangle; clip.Intersect(ViewRectangle); view.Draw(e.Graphics, clip); }
0
7. Example
Project: ShareX
Source File: ImageHelper.cs
Source File: ImageHelper.cs
public static Rectangle CreateIntersectRectangle(Size applySize, Rectangle rect, bool invert) { Rectangle myRect; if (invert) { myRect = new Rectangle(0, 0, applySize.Width, applySize.Height); } else { Rectangle applyRect = new Rectangle(0, 0, applySize.Width, applySize.Height); myRect = new Rectangle(rect.X, rect.Y, rect.Width, rect.Height); myRect.Intersect(applyRect); } return myRect; }
0
8. Example
Project: ShareX
Source File: ShapeManager.cs
Source File: ShapeManager.cs
public Image CropImage(Rectangle rect, bool onlyIfSizeDifferent = false) { rect = CaptureHelpers.ScreenToClient(rect); Point offset = CaptureHelpers.ScreenToClient(Form.CanvasRectangle.Location); rect.X -= offset.X; rect.Y -= offset.Y; rect.Intersect(new Rectangle(0, 0, Form.Canvas.Width, Form.Canvas.Height)); if (rect.IsValid() && (!onlyIfSizeDifferent || rect.Size != Form.Canvas.Size)) { return ImageHelpers.CropBitmap((Bitmap)Form.Canvas, rect); } return null; }
0
9. Example
Project: ynoteclassic
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; /n ..... /n //View Source file for more details /n }
0
10. Example
Project: ShareX
Source File: ImageHelper.cs
Source File: ImageHelper.cs
public static Rectangle CreateIntersectRectangle(Size applySize, Rectangle rect, bool invert) { Rectangle myRect; if (invert) { myRect = new Rectangle(0, 0, applySize.Width, applySize.Height); } else { Rectangle applyRect = new Rectangle(0, 0, applySize.Width, applySize.Height); myRect = new Rectangle(rect.X, rect.Y, rect.Width, rect.Height); myRect.Intersect(applyRect); } return myRect; }
0
11. Example
Project: SquareOne
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; /n ..... /n //View Source file for more details /n }
0
12. Example
Project: ceptr
Source File: DisplayingDockList.cs
Source File: DisplayingDockList.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
13. Example
Project: ceptr
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
14. Example
Project: Zydeo
Source File: MainForm.cs
Source File: MainForm.cs
private bool verifySizeAndLoc(Size size, Point loc) { // Minimum value means no /n ..... /n //View Source file for more details /n }
0
15. Example
Project: ClearCanvas
Source File: Roi.cs
Source File: Roi.cs
public Rectangle GetBoundingBoxRounded(bool constrainToImage) { Rectangle bounds = RectangleUtilities.RoundInflate(BoundingBox); if (constrainToImage) { bounds.Intersect(new Rectangle(0, 0, ImageSize.Width - 1, ImageSize.Height - 1)); } return bounds; }
0
16. Example
Project: HOPE
Source File: DisplayingDockList.cs
Source File: DisplayingDockList.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
17. Example
Project: HOPE
Source File: VisibleNestedPaneCollection.cs
Source File: VisibleNestedPaneCollection.cs
private void CalculateBounds() { if (Count == 0) return; this[0].NestedDockingStatus.Se/n ..... /n //View Source file for more details /n }
0
18. Example
Project: dockpanelsuite
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
public override GraphicsPath GetOutline(int index) { Point[] pts = new Point[8];/n ..... /n //View Source file for more details /n }
0
19. Example
Project: dockpanelsuite
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected override int HitTest(Point point) { Rectangle rectTabStrip = TabsRectangle; for (int i=0; i<Tabs.Count; i++) { Rectangle rectTab = Tabs[i].Rectangle.Value; rectTab.Intersect(rectTabStrip); if (rectTab.Contains(point)) return i; } return -1; }
0
20. Example
Project: server
Source File: Creature.cs
Source File: Creature.cs
public virtual bool Walk(Direction direction) { int oldX = X, oldY = Y, newX = X/n ..... /n //View Source file for more details /n }
0
21. Example
Project: gitter
Source File: ViewHost.cs
Source File: ViewHost.cs
public Rectangle GetDockBounds(ViewHost viewHost, DockResult dockResult) { Verify.Argument.IsNo/n ..... /n //View Source file for more details /n }
0
22. Example
Project: P
Source File: MainWindow.xaml.cs
Source File: MainWindow.xaml.cs
private void RestorePosition() { this.SizeChanged -= OnWindowSizeChanged; /n ..... /n //View Source file for more details /n }
0
23. Example
Project: ATF
Source File: CanvasControl.cs
Source File: CanvasControl.cs
private Rectangle MakeSelectionRect(Point p1, Point p2) { Rectangle rect = GdiUtil.MakeRectangle(p1, p2); rect.Intersect(VisibleClientRectangle); rect = RectangleToScreen(rect); return rect; }
0
24. Example
Project: SkinFramework
Source File: ImageStrip.cs
Source File: ImageStrip.cs
public void Draw(Graphics g, int index, Rectangle destRect, Rectangle srcRect, DrawingAlign /n ..... /n //View Source file for more details /n }
0
25. Example
Project: ArnoldSimulator
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected internal override GraphicsPath GetOutline(int index) { Point[] pts = n/n ..... /n //View Source file for more details /n }
0
26. Example
Project: ArnoldSimulator
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected internal override int HitTest(Point ptMouse) { Rectangle rectTabStrip = TabsRectangle; for (int i=0; i<Tabs.Count; i++) { Rectangle rectTab = GetTabRectangle(i); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(ptMouse)) return i; } return -1; }
0
27. Example
Project: fdotoolbox
Source File: TextArea.cs
Source File: TextArea.cs
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { int currentXPos = 0; /n ..... /n //View Source file for more details /n }
0
28. Example
Project: OpenLiveWriter
Source File: ImageCropControl.cs
Source File: ImageCropControl.cs
public virtual Rectangle GetNewBounds(Point newLoc) { Rectangle newRect = initialBounds; if (anchor == ANCHOR_ALL) // move { newRect = DoMove(newLoc); } else // resize { newRect = DoResize(newLoc); } if (container != null) newRect.Intersect(container.Value); return newRect; }
0
29. Example
Project: ShareX
Source File: ImageHelper.cs
Source File: ImageHelper.cs
public static bool Crop(ref Image image, ref Rectangle cropRectangle) { Image returnImage = null; if (image != null && image is Bitmap && ((image.Width * image.Height) > 0)) { cropRectangle.Intersect(new Rectangle(0, 0, image.Width, image.Height)); if (cropRectangle.Width != 0 || cropRectangle.Height != 0) { returnImage = CloneArea(image, cropRectangle, PixelFormat.DontCare); image.Dispose(); image = returnImage; return true; } } LOG.Warn("Can't crop a null/zero size image!"); return false; }
0
30. Example
Project: ShareX
Source File: DrawableContainer.cs
Source File: DrawableContainer.cs
public virtual void DrawContent(Graphics graphics, Bitmap bmp, RenderMode renderMode, Rectangle clip/n ..... /n //View Source file for more details /n }
0
31. Example
Project: ynoteclassic
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected internal override GraphicsPath GetOutline(int index) { Point[] pts = n/n ..... /n //View Source file for more details /n }
0
32. Example
Project: ynoteclassic
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected internal override int HitTest(Point ptMouse) { Rectangle rectTabStrip = TabsRectangle; for (int i = 0; i < Tabs.Count; i++) { Rectangle rectTab = GetTabRectangle(i); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(ptMouse)) return i; } return -1; }
0
33. Example
Project: ShareX
Source File: ImageHelper.cs
Source File: ImageHelper.cs
public static bool Crop(ref Image image, ref Rectangle cropRectangle) { Image returnImage = null; if (image != null && image is Bitmap && ((image.Width * image.Height) > 0)) { cropRectangle.Intersect(new Rectangle(0, 0, image.Width, image.Height)); if (cropRectangle.Width != 0 || cropRectangle.Height != 0) { returnImage = CloneArea(image, cropRectangle, PixelFormat.DontCare); image.Dispose(); image = returnImage; return true; } } LOG.Warn("Can't crop a null/zero size image!"); return false; }
0
34. Example
Project: ShareX
Source File: DrawableContainer.cs
Source File: DrawableContainer.cs
public virtual void DrawContent(Graphics graphics, Bitmap bmp, RenderMode renderMode, Rectangle clip/n ..... /n //View Source file for more details /n }
0
35. Example
Project: SquareOne
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected override GraphicsPath GetOutline(int index) { Point[] pts = new Point[/n ..... /n //View Source file for more details /n }
0
36. Example
Project: SquareOne
Source File: VS2003DockPaneStrip.cs
Source File: VS2003DockPaneStrip.cs
protected override int HitTest(Point ptMouse) { Rectangle rectTabStrip = TabsRectangle; for (int i=0; i<Tabs.Count; i++) { Rectangle rectTab = GetTabRectangle(i); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(ptMouse)) return i; } return -1; }
0
37. Example
Project: ceptr
Source File: DockPaneStripVS2003.cs
Source File: DockPaneStripVS2003.cs
protected internal override int GetHitTest(Point ptMouse) { Rectangle rectTabStrip = TabsRectangle; for (int i=0; i<Tabs.Count; i++) { Rectangle rectTab = GetTabRectangle(i); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(ptMouse)) return i; } return -1; }
0
38. Example
Project: winforms
Source File: TimelineViewTrack.cs
Source File: TimelineViewTrack.cs
public void InvalidateLeftSidebar() { if (this.parentView == null) return; Rectangle trackRect = this.parentView.GetTrackRectangle(this); Rectangle rectOnParent; Rectangle targetRect; rectOnParent = trackRect; targetRect = new Rectangle( rectOnParent.X, rectOnParent.Y, this.parentView.LeftSidebarSize, rectOnParent.Height); rectOnParent.Intersect(targetRect); rectOnParent.Intersect(this.parentView.ClientRectangle); if (!rectOnParent.IsEmpty) { this.parentView.Invalidate(rectOnParent); } }
0
39. Example
Project: winforms
Source File: TimelineViewTrack.cs
Source File: TimelineViewTrack.cs
public void InvalidateRightSidebar() { if (this.parentView == null) return; Rectangle trackRect = this.parentView.GetTrackRectangle(this); Rectangle rectOnParent; Rectangle targetRect; rectOnParent = trackRect; targetRect = new Rectangle( rectOnParent.Right - this.parentView.RightSidebarSize, rectOnParent.Y, this.parentView.RightSidebarSize, rectOnParent.Height); rectOnParent.Intersect(targetRect); rectOnParent.Intersect(this.parentView.ClientRectangle); if (!rectOnParent.IsEmpty) { this.parentView.Invalidate(rectOnParent); } }
0
40. Example
Project: HOPE
Source File: DockPaneStripVS2003.cs
Source File: DockPaneStripVS2003.cs
protected internal override int GetHitTest(Point ptMouse) { Rectangle rectTabStrip = TabsRectangle; for (int i=0; i<Tabs.Count; i++) { Rectangle rectTab = GetTabRectangle(i); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(ptMouse)) return i; } return -1; }
0
41. Example
Project: dockpanelsuite
Source File: VS2005DockPaneStrip.cs
Source File: VS2005DockPaneStrip.cs
private GraphicsPath GetOutline_Document(int index) { Rectangle rectTab = Tabs[i/n ..... /n //View Source file for more details /n }
0
42. Example
Project: dockpanelsuite
Source File: VS2005DockPaneStrip.cs
Source File: VS2005DockPaneStrip.cs
private GraphicsPath GetOutline_ToolWindow(int index) { Rectangle rectTab = Tabs[index].Rectangle.Value; rectTab.Intersect(TabsRectangle); rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); GraphicsPath path = new GraphicsPath(); GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true); path.AddPath(pathTab, true); path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top); path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top); path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top); path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top); path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top); return path; }
0
43. Example
Project: dockpanelsuite
Source File: VS2003AutoHideStrip.cs
Source File: VS2003AutoHideStrip.cs
protected override IDockContent HitTest(Point point) { foreach(DockState state in DockStates) { Rectangle rectTabStrip = GetLogicalTabStripRectangle(state, true); if (!rectTabStrip.Contains(point)) continue; foreach(Pane pane in GetPanes(state)) { foreach(TabVS2003 tab in pane.AutoHideTabs) { Rectangle rectTab = GetTabRectangle(tab, true); rectTab.Intersect(rectTabStrip); if (rectTab.Contains(point)) return tab.Content; } } } return null; }
0
44. Example
Project: dockpanelsuite
Source File: VS2005MultithreadingDockPaneStrip.cs
Source File: VS2005MultithreadingDockPaneStrip.cs
private GraphicsPath GetOutline_Document(int index) { Rectangle rectTab = Tabs[i/n ..... /n //View Source file for more details /n }
0
45. Example
Project: dockpanelsuite
Source File: VS2005MultithreadingDockPaneStrip.cs
Source File: VS2005MultithreadingDockPaneStrip.cs
private GraphicsPath GetOutline_ToolWindow(int index) { Rectangle rectTab = Tabs[index].Rectangle.Value; rectTab.Intersect(TabsRectangle); rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); GraphicsPath path = new GraphicsPath(); GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true); path.AddPath(pathTab, true); path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top); path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top); path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top); path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top); path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top); return path; }
0
46. Example
Project: dockpanelsuite
Source File: VS2012DockPaneStrip.cs
Source File: VS2012DockPaneStrip.cs
private GraphicsPath GetOutline_Document(int index) { Rectangle rectTab = Tabs[i/n ..... /n //View Source file for more details /n }
0
47. Example
Project: dockpanelsuite
Source File: VS2012DockPaneStrip.cs
Source File: VS2012DockPaneStrip.cs
private GraphicsPath GetOutline_ToolWindow(int index) { Rectangle rectTab = Tabs[index].Rectangle.Value; rectTab.Intersect(TabsRectangle); rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); GraphicsPath path = new GraphicsPath(); GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true); path.AddPath(pathTab, true); path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top); path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top); path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top); path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top); path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top); return path; }
0
48. Example
Project: dockpanelsuite
Source File: VS2012DockPaneStrip.cs
Source File: VS2012DockPaneStrip.cs
private GraphicsPath GetTabOutline_Document(Tab tab, bool rtlTransform, bool toScreen, bool full) { GraphicsPath.Reset(); Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab)); // Shorten TabOutline so it doesn't get overdrawn by icons next to it rect.Intersect(TabsRectangle); rect.Width--; if (rtlTransform) rect = DrawHelper.RtlTransform(this, rect); if (toScreen) rect = RectangleToScreen(rect); GraphicsPath.AddRectangle(rect); return GraphicsPath; }
0
49. Example
Project: dockpanelsuite
Source File: VS2013DockPaneStrip.cs
Source File: VS2013DockPaneStrip.cs
private GraphicsPath GetOutline_Document(int index) { Rectangle rectTab = Tabs[i/n ..... /n //View Source file for more details /n }
0
50. Example
Project: dockpanelsuite
Source File: VS2013DockPaneStrip.cs
Source File: VS2013DockPaneStrip.cs
private GraphicsPath GetOutline_ToolWindow(int index) { Rectangle rectTab = Tabs[index].Rectangle.Value; rectTab.Intersect(TabsRectangle); rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); GraphicsPath path = new GraphicsPath(); GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true); path.AddPath(pathTab, true); path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top); path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top); path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top); path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top); path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top); return path; }