Here are the examples of the csharp api class System.Drawing.Drawing2D.GraphicsPath.GetBounds() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
89 Examples
0
1. Example
Project: VisualPlus
Source File: GraphicsPathExtension.cs
Source File: GraphicsPathExtension.cs
public static GraphicsPath ToBorderPath(this GraphicsPath borderPath, Border border) { return VisualBorderRenderer.CreateBorderTypePath(borderPath.GetBounds().ToRectangle(), border); }
0
2. Example
Project: NHibernate.Spatial
Source File: PolygonGraphicsPath.cs
Source File: PolygonGraphicsPath.cs
public RectangleF GetBoundsF() { return Path.GetBounds(); }
0
3. Example
Project: dockpanelsuite
Source File: VS2005AutoHideStrip.cs
Source File: VS2005AutoHideStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline((TabVS2005)tab, true, true); RectangleF bounds = path.GetBounds(); return new Rectangle((int)bounds.Left, (int)bounds.Top, (int)bounds.Width, (int)bounds.Height); }
0
4. Example
Project: dockpanelsuite
Source File: VS2005DockPaneStrip.cs
Source File: VS2005DockPaneStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline(tab, true, false); RectangleF rectangle = path.GetBounds(); return new Rectangle((int)rectangle.Left, (int)rectangle.Top, (int)rectangle.Width, (int)rectangle.Height); }
0
5. Example
Project: dockpanelsuite
Source File: VS2005MultithreadingAutoHideStrip.cs
Source File: VS2005MultithreadingAutoHideStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline((TabVS2005)tab, true, true); RectangleF bounds = path.GetBounds(); return new Rectangle((int)bounds.Left, (int)bounds.Top, (int)bounds.Width, (int)bounds.Height); }
0
6. Example
Project: dockpanelsuite
Source File: VS2005MultithreadingDockPaneStrip.cs
Source File: VS2005MultithreadingDockPaneStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline(tab, true, false); RectangleF rectangle = path.GetBounds(); return new Rectangle((int)rectangle.Left, (int)rectangle.Top, (int)rectangle.Width, (int)rectangle.Height); }
0
7. Example
Project: dockpanelsuite
Source File: VS2012AutoHideStrip.cs
Source File: VS2012AutoHideStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline((TabVS2012)tab, true); RectangleF bounds = path.GetBounds(); return new Rectangle((int)bounds.Left, (int)bounds.Top, (int)bounds.Width, (int)bounds.Height); }
0
8. Example
Project: dockpanelsuite
Source File: VS2012DockPaneStrip.cs
Source File: VS2012DockPaneStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline(tab, true, false); RectangleF rectangle = path.GetBounds(); return new Rectangle((int)rectangle.Left, (int)rectangle.Top, (int)rectangle.Width, (int)rectangle.Height); }
0
9. Example
Project: dockpanelsuite
Source File: VS2013DockPaneStrip.cs
Source File: VS2013DockPaneStrip.cs
protected override Rectangle GetTabBounds(Tab tab) { GraphicsPath path = GetTabOutline(tab, true, false); RectangleF rectangle = path.GetBounds(); return new Rectangle((int)rectangle.Left, (int)rectangle.Top, (int)rectangle.Width, (int)rectangle.Height); }
0
10. Example
Project: referencesource
Source File: Selection.cs
Source File: Selection.cs
[ System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedPar/n ..... /n //View Source file for more details /n }
0
11. Example
Project: referencesource
Source File: Selection.cs
Source File: Selection.cs
internal void AddHotRegion( GraphicsPath path, bool relativePath, ChartElementType type, object selectedObject ) { if( ( ProcessChartMode & ProcessMode.HotRegions ) == ProcessMode.HotRegions ) { HotRegion region = new HotRegion(); region.SelectedObject = selectedObject; region.Type = type; region.Path = (GraphicsPath)path.Clone(); region.BoundingRectangle = path.GetBounds(); region.RelativeCoordinates = relativePath; _regionList.Add( region ); } }
0
12. Example
Project: NHibernate.Spatial
Source File: GeometryCollectionGraphicsPath.cs
Source File: GeometryCollectionGraphicsPath.cs
public RectangleF GetBoundsF() { var rectangle = new RectangleF(); foreach (var shape in _shapes) { rectangle = rectangle.IsEmpty ? shape.GetBounds() : RectangleF.Union(rectangle, shape.GetBounds()); } return rectangle; }
0
13. Example
Project: SharpMap
Source File: WarpPathToPath.cs
Source File: WarpPathToPath.cs
internal static GraphicsPath PrepareTextPathToWarp(GraphicsPath path, Double totalPathLength, bool ignoreLength, StringFormat format) { var rect = path.GetBounds(); double maxX = rect.Right; double minX = rect.Left; //Check if text path fits or is really wanted double len = maxX - minX; if (len > totalPathLength && !ignoreLength) return null; //Offset for center double xStart; switch (format.Alignment) { default: xStart = (totalPathLength) * 0.5d; break; case StringAlignment.Near: xStart = 0; break; case StringAlignment.Far: xStart = totalPathLength; break; } path.Transform(new Matrix(1f, 0f, 0f, 1f, (float)xStart, 0f)); return path; }
0
14. Example
Project: TDMaker
Source File: Symbol.cs
Source File: Symbol.cs
public void DrawSymbol( Graphics g, GraphPane pane, int x, int y, float scaleFactor, bool isSelected, PointPair dataValue ) { Symbol source = this; if ( isSelected ) source = Selection.Symbol; // Only draw if the symbol is visible if ( _isVisible && this.Type != SymbolType.None && x < 100000 && x > -100000 && y < 100000 && y > -100000 ) { SmoothingMode sModeSave = g.SmoothingMode; if ( _isAntiAlias ) g.SmoothingMode = SmoothingMode.HighQuality; using ( Pen pen = _border.GetPen( pane, scaleFactor, dataValue ) ) using ( GraphicsPath path = this.MakePath( g, scaleFactor ) ) using ( Brush brush = this.Fill.MakeBrush( path.GetBounds(), dataValue ) ) { DrawSymbol( g, x, y, path, pen, brush ); } g.SmoothingMode = sModeSave; } }
0
15. Example
Project: referencesource
Source File: Selection.cs
Source File: Selection.cs
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters",/n ..... /n //View Source file for more details /n }
0
16. Example
Project: referencesource
Source File: Selection.cs
Source File: Selection.cs
private RectangleF GetHotRegionRectangle(HotRegion rgn, RectangleF unionWith, ChartElementType elementType) { RectangleF rect; if (rgn.Path != null) { rect = rgn.Path.GetBounds(); } else { rect = rgn.BoundingRectangle; } if (rgn.RelativeCoordinates) { rect = this.Graph.GetAbsoluteRectangle(rect); } if (elementType == ChartElementType.AxisLabels) { if (rect.Width > rect.Height) { rect.Inflate(-5, -2); } else if (rect.Width < rect.Height) { rect.Inflate(-2, -5); } } if (!unionWith.IsEmpty) { return RectangleF.Union(unionWith, rect); } return rect; }
0
17. Example
Project: ZedGraph
Source File: Symbol.cs
Source File: Symbol.cs
public void DrawSymbol( Graphics g, GraphPane pane, int x, int y, float scaleFactor, bool isSelected, PointPair dataValue ) { Symbol source = this; if ( isSelected ) source = Selection.Symbol; // Only draw if the symbol is visible if ( _isVisible && this.Type != SymbolType.None && x < 100000 && x > -100000 && y < 100000 && y > -100000 ) { SmoothingMode sModeSave = g.SmoothingMode; if ( _isAntiAlias ) g.SmoothingMode = SmoothingMode.HighQuality; using ( Pen pen = _border.GetPen( pane, scaleFactor, dataValue ) ) using ( GraphicsPath path = this.MakePath( g, scaleFactor ) ) using ( Brush brush = this.Fill.MakeBrush( path.GetBounds(), dataValue ) ) { DrawSymbol( g, x, y, path, pen, brush ); } g.SmoothingMode = sModeSave; } }
0
18. Example
Project: Krypton
Source File: KryptonOffice2007Renderer.cs
Source File: KryptonOffice2007Renderer.cs
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) { // Cann/n ..... /n //View Source file for more details /n }
0
19. Example
Project: Krypton
Source File: KryptonOffice2010Renderer.cs
Source File: KryptonOffice2010Renderer.cs
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) { // Cann/n ..... /n //View Source file for more details /n }
0
20. Example
Project: Krypton
Source File: KryptonSparkleRenderer.cs
Source File: KryptonSparkleRenderer.cs
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) { // Cann/n ..... /n //View Source file for more details /n }
0
21. Example
Project: Krypton
Source File: RenderStandard.cs
Source File: RenderStandard.cs
private void DrawBackSolidInside(RenderContext context, Rec/n ..... /n //View Source file for more details /n }
0
22. Example
Project: MapleShark
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
23. Example
Project: dockpanelsuite
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
24. Example
Project: dockpanelsuite
Source File: VS2012DockOutlineFactory.cs
Source File: VS2012DockOutlineFactory.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
25. Example
Project: ArnoldSimulator
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
26. Example
Project: ArnoldSimulator
Source File: VS2012LightTheme.cs
Source File: VS2012LightTheme.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
27. Example
Project: lua-tilde
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
28. Example
Project: TDMaker
Source File: PolyObj.cs
Source File: PolyObj.cs
override public void Draw( Graphics g, PaneBase pane, float scaleFactor ) { if ( _points != null && _points.Length > 1 ) { using ( GraphicsPath path = MakePath( pane ) ) { // Fill or draw the symbol as required if ( _fill.IsVisible ) { using ( Brush brush = this.Fill.MakeBrush( path.GetBounds() ) ) g.FillPath( brush, path ); } if ( _border.IsVisible ) { using ( Pen pen = _border.GetPen( pane, scaleFactor ) ) g.DrawPath( pen, path ); } } } }
0
29. Example
Project: referencesource
Source File: AreaChart.cs
Source File: AreaChart.cs
private void FillLastSeriesGradient(ChartGraphics graph) { // Add last line in the path if(areaPath != null) { areaPath.AddLine(areaPath.GetLastPoint().X, areaPath.GetLastPoint().Y, areaPath.GetLastPoint().X, axisPos.Y); } // Fill whole area with gradient if(gradientFill && areaPath != null) { // Set clip region graph.SetClip( Area.PlotAreaPosition.ToRectangleF() ); // Create brush using (Brush areaGradientBrush = graph.GetGradientBrush(areaPath.GetBounds(), this.Series.Color, this.Series.BackSecondaryColor, this.Series.BackGradientStyle)) { // Fill area with gradient graph.FillPath(areaGradientBrush, areaPath); gradientFill = false; } // Reset clip region graph.ResetClip(); } if(areaPath != null) { areaPath.Dispose(); areaPath = null; } }
0
30. Example
Project: referencesource
Source File: FastLineChart.cs
Source File: FastLineChart.cs
public virtual void DrawLine( Series series, DataPoint point, DataPoint pointMin, DataPo/n ..... /n //View Source file for more details /n }
0
31. Example
Project: Nexus-Mod-Manager
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
32. Example
Project: ShareX
Source File: FreehandContainer.cs
Source File: FreehandContainer.cs
public override bool HandleMouseMove(int mouseX, int mouseY) { Point previousPoint = capturePoints[capturePoints.Count - 1]; if (GeometryHelper.Distance2D(previousPoint.X, previousPoint.Y, mouseX, mouseY) >= 2 * EditorConfig.FreehandSensitivity) { capturePoints.Add(new Point(mouseX, mouseY)); } if (GeometryHelper.Distance2D(lastMouse.X, lastMouse.Y, mouseX, mouseY) >= EditorConfig.FreehandSensitivity) { //path.AddCurve(new Point[]{lastMouse, new Point(mouseX, mouseY)}); freehandPath.AddLine(lastMouse, new Point(mouseX, mouseY)); lastMouse = new Point(mouseX, mouseY); // Only re-calculate the bounds & redraw when we added something to the path myBounds = Rectangle.Round(freehandPath.GetBounds()); Invalidate(); } return true; }
0
33. Example
Project: ynoteclassic
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
34. Example
Project: ynoteclassic
Source File: VS2012LightTheme.cs
Source File: VS2012LightTheme.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
35. Example
Project: ShareX
Source File: FreehandContainer.cs
Source File: FreehandContainer.cs
public override bool HandleMouseMove(int mouseX, int mouseY) { Point previousPoint = capturePoints[capturePoints.Count - 1]; if (GeometryHelper.Distance2D(previousPoint.X, previousPoint.Y, mouseX, mouseY) >= (2 * EditorConfig.FreehandSensitivity)) { capturePoints.Add(new Point(mouseX, mouseY)); } if (GeometryHelper.Distance2D(lastMouse.X, lastMouse.Y, mouseX, mouseY) >= EditorConfig.FreehandSensitivity) { //path.AddCurve(new Point[]{lastMouse, new Point(mouseX, mouseY)}); freehandPath.AddLine(lastMouse, new Point(mouseX, mouseY)); lastMouse = new Point(mouseX, mouseY); // Only re-calculate the bounds & redraw when we added something to the path myBounds = Rectangle.Round(freehandPath.GetBounds()); Invalidate(); } return true; }
0
36. Example
Project: SquareOne
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
37. Example
Project: WGestures
Source File: CanvasWindowGestureView.cs
Source File: CanvasWindowGestureView.cs
private void OnFadeOutTimerElapsed(object o, ElapsedEventArgs e) { lock (_fadeOuTimer) { if (!_fadeOuTimer.Enabled) return; Debug.Write("*"); //???????????_fadeOutTo? var before = _canvasOpacity; _canvasOpacity -= FadeOutDelta; if (before < _canvasOpacity) { EndView(); _fadeOuTimer.Enabled = false; } else { _canvasWindow.SetDiBitmap(_canvasBuf, Rectangle.Ceiling(_labelRect), _canvasOpacity); _canvasWindow.SetDiBitmap(_canvasBuf, Rectangle.Ceiling(_gPathDirty.GetBounds()), _canvasOpacity); } } }
0
38. Example
Project: WGestures
Source File: CanvasWindowGestureView.cs
Source File: CanvasWindowGestureView.cs
private void ShowLabel(Color color, string text, Color bgColor) { _labelVisible = true; _labelColor = color; _labelText = text; _labelBgColor = bgColor; _labelChanged = true; _lastLabelRect = _labelRect; _labelPath.Reset(); var msgPos = new PointF(_screenBounds.Width / 2, (_screenBounds.Height / 2) + _screenBounds.Width / 8); _labelPath.AddString(_labelText, _labelFont.FontFamily, 0, _labelFont.Size * _dpiFactor, msgPos, StringFormat.GenericDefault); _labelRect = _labelPath.GetBounds(); msgPos.X -= _labelRect.Width / 2; _labelPath.Reset(); _labelPath.AddString(_labelText, _labelFont.FontFamily, 0, _labelFont.Size * _dpiFactor, msgPos, StringFormat.GenericDefault); _labelRect = RectangleF.Inflate(_labelPath.GetBounds(), 25 * _dpiFactor, 15 * _dpiFactor); }
0
39. Example
Project: ZedGraph
Source File: PolyObj.cs
Source File: PolyObj.cs
override public void Draw( Graphics g, PaneBase pane, float scaleFactor ) { if ( _points != null && _points.Length > 1 ) { using ( GraphicsPath path = MakePath( pane ) ) { // Fill or draw the symbol as required if ( _fill.IsVisible ) { using ( Brush brush = this.Fill.MakeBrush( path.GetBounds() ) ) g.FillPath( brush, path ); } if ( _border.IsVisible ) { using ( Pen pen = _border.GetPen( pane, scaleFactor ) ) g.DrawPath( pen, path ); } } } }
0
40. Example
Project: ceptr
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
41. Example
Project: HOPE
Source File: DockPanel.DockDragHandler.cs
Source File: DockPanel.DockDragHandler.cs
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) { /n ..... /n //View Source file for more details /n }
0
42. Example
Project: diagramnet
Source File: LineController.cs
Source File: LineController.cs
public bool HitTest(Rectangle r) { GraphicsPath gp = new GraphicsPath(); Matrix mtx = new Matrix(); gp.AddRectangle(new Rectangle(el.Location.X, el.Location.Y, el.Size.Width, el.Size.Height)); gp.Transform(mtx); Rectangle retGp = Rectangle.Round(gp.GetBounds()); return r.Contains (retGp); }
0
43. Example
Project: diagramnet
Source File: RectangleController.cs
Source File: RectangleController.cs
public virtual bool HitTest(Rectangle r) { GraphicsPath gp = new GraphicsPath(); Matrix mtx = new Matrix(); Point elLocation = el.Location; Size elSize = el.Size; gp.AddRectangle(new Rectangle(elLocation.X, elLocation.Y, elSize.Width, elSize.Height)); gp.Transform(mtx); Rectangle retGp = Rectangle.Round(gp.GetBounds()); return r.Contains (retGp); }
0
44. Example
Project: diagramnet
Source File: RightAngleLinkController.cs
Source File: RightAngleLinkController.cs
bool Dalssoft.DiagramNet.IController.HitTest(Rectangle r) { GraphicsPath gp = new GraphicsPath(); Matrix mtx = new Matrix(); Point elLocation = el.Location; Size elSize = el.Size; gp.AddRectangle(new Rectangle(elLocation.X, elLocation.Y, elSize.Width, elSize.Height)); gp.Transform(mtx); Rectangle retGp = Rectangle.Round(gp.GetBounds()); return r.Contains (retGp); }
0
45. Example
Project: TDMaker
Source File: Symbol.cs
Source File: Symbol.cs
public void Draw( Graphics g, GraphPane pane, LineItem curve, float scaleFactor, bool isSelected /n ..... /n //View Source file for more details /n }
0
46. Example
Project: referencesource
Source File: ChartGraphics3D.cs
Source File: ChartGraphics3D.cs
private void DrawBarStyleGradients( Matrix3D matrix, BarDrawingStyle barDrawingStyle, Rec/n ..... /n //View Source file for more details /n }
0
47. Example
Project: ShareX
Source File: RegionCaptureTasks.cs
Source File: RegionCaptureTasks.cs
public static Image ApplyRegionPathToImage(Image img, GraphicsPath gp) { if (img != null && gp != null) { Rectangle regionArea = Rectangle.Round(gp.GetBounds()); Rectangle screenRectangle = CaptureHelpers.GetScreenBounds0Based(); regionArea = Rectangle.Intersect(regionArea, screenRectangle); if (regionArea.IsValid()) { using (Bitmap bmp = img.CreateEmptyBitmap()) using (Graphics g = Graphics.FromImage(bmp)) using (TextureBrush brush = new TextureBrush(img)) { g.PixelOffsetMode = PixelOffsetMode.Half; g.SmoothingMode = SmoothingMode.HighQuality; g.FillPath(brush, gp); return ImageHelpers.CropBitmap(bmp, regionArea); } } } return null; }
0
48. Example
Project: SharpMap
Source File: LabelLayer.cs
Source File: LabelLayer.cs
private static void CalculateLabelAroundOnLineString(ILineString line, ref BaseLabel label, MapViewp/n ..... /n //View Source file for more details /n }
0
49. Example
Project: ZedGraph
Source File: Symbol.cs
Source File: Symbol.cs
public void Draw( Graphics g, GraphPane pane, LineItem curve, float scaleFactor, bool isSelected /n ..... /n //View Source file for more details /n }
0
50. Example
Project: Toxy
Source File: ShapeCaptureHelpers.cs
Source File: ShapeCaptureHelpers.cs
public static Image GetRegionImage(Image surfaceImage, GraphicsPath regionFillPath, GraphicsPath regionDrawPath, SurfaceOptions options) { if (regionFillPath != null) { Image img; Rectangle regionArea = Rectangle.Round(regionFillPath.GetBounds()); Rectangle screenRectangle = CaptureHelpers.GetScreenBounds0Based(); Rectangle newRegionArea = Rectangle.Intersect(regionArea, screenRectangle); using (GraphicsPath gp = (GraphicsPath)regionFillPath.Clone()) { MoveGraphicsPath(gp, -Math.Max(0, regionArea.X), -Math.Max(0, regionArea.Y)); img = ImageHelpers.CropImage(surfaceImage, newRegionArea, gp); if (options.DrawBorder) { GraphicsPath gpOutline = regionDrawPath ?? regionFillPath; using (GraphicsPath gp2 = (GraphicsPath)gpOutline.Clone()) { MoveGraphicsPath(gp2, -Math.Max(0, regionArea.X), -Math.Max(0, regionArea.Y)); img = ImageHelpers.DrawOutline(img, gp2); } } } return img; } return null; }