Here are the examples of the csharp api class System.Drawing.Region.Clone() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
19 Examples
0
1. Example
Project: RNGReporter
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (Region != null) { Region.Dispose(); Region = null; } if (content.Region != null) { Region = content.Region.Clone(); } }
0
2. Example
Project: gitter
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if(this.Region != null) { this.Region.Dispose(); this.Region = null; } if(_content != null && _content.Region != null) { this.Region = _content.Region.Clone(); } }
0
3. Example
Project: JexusManager
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (this.Region != null) { this.Region.Dispose(); this.Region = null; } if (content.Region != null) { this.Region = content.Region.Clone(); } }
0
4. Example
Project: NPS_Browser
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (this.Region != null) { this.Region.Dispose(); this.Region = null; } if (content.Region != null) { this.Region = content.Region.Clone(); } }
0
5. Example
Project: WEPExplorer
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (this.Region != null) { this.Region.Dispose(); this.Region = null; } if (content.Region != null) { this.Region = content.Region.Clone(); } }
0
6. Example
Project: TDMaker
Source File: GraphObjList.cs
Source File: GraphObjList.cs
public void Draw( Graphics g, PaneBase pane, float scaleFactor, ZOrder zOrder ) { // Draw the items in reverse order, so the last items in the // list appear behind the first items (consistent with // CurveList) for ( int i=this.Count-1; i>=0; i-- ) { GraphObj item = this[i]; if ( item.ZOrder == zOrder && item.IsVisible ) { Region region = null; if ( item.IsClippedToChartRect && pane is GraphPane ) { region = g.Clip.Clone(); g.SetClip( ((GraphPane)pane).Chart._rect ); } item.Draw( g, pane, scaleFactor ); if ( item.IsClippedToChartRect && pane is GraphPane ) g.Clip = region; } } }
0
7. Example
Project: ServiceBusExplorer
Source File: Popup.cs
Source File: Popup.cs
private void UpdateRegion() { if (Region != null) { Region.Dispose(); Region = null; } if (content.Region != null) { Region = content.Region.Clone(); } }
0
8. Example
Project: justdecompile-plugins
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (this.Region != null) { this.Region.Dispose(); this.Region = null; } if (content.Region != null) { this.Region = content.Region.Clone(); } }
0
9. Example
Project: SMEncounterRNGTool
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (Region != null) { Region.Dispose(); Region = null; } if (content.Region != null) { Region = content.Region.Clone(); } }
0
10. Example
Project: 3DSRNGTool
Source File: Popup.cs
Source File: Popup.cs
protected void UpdateRegion() { if (Region != null) { Region.Dispose(); Region = null; } if (content.Region != null) { Region = content.Region.Clone(); } }
0
11. Example
Project: ZedGraph
Source File: GraphObjList.cs
Source File: GraphObjList.cs
public void Draw( Graphics g, PaneBase pane, float scaleFactor, ZOrder zOrder ) { // Draw the items in reverse order, so the last items in the // list appear behind the first items (consistent with // CurveList) for ( int i=this.Count-1; i>=0; i-- ) { GraphObj item = this[i]; if ( item.ZOrder == zOrder && item.IsVisible ) { Region region = null; if ( item.IsClippedToChartRect && pane is GraphPane ) { region = g.Clip.Clone(); g.SetClip( ((GraphPane)pane).Chart._rect ); } item.Draw( g, pane, scaleFactor ); if ( item.IsClippedToChartRect && pane is GraphPane ) g.Clip = region; } } }
0
12. Example
Project: Krypton
Source File: ViewDrawGroupBoxDocker.cs
Source File: ViewDrawGroupBoxDocker.cs
public override void RenderBorder(RenderContext context) { // The first and only child is the caption content ViewDrawContent caption = (ViewDrawContent)this[0]; // Remember current clipping region so we can put it back later Region clipRegion = context.Graphics.Clip.Clone(); // Exclude the image/short/long text rectangles from being drawn Region excludeRegion = clipRegion.Clone(); Rectangle imageRect = caption.ImageRectangle(context); Rectangle shortRect = caption.ShortTextRect(context); Rectangle longRect = caption.LongTextRect(context); imageRect.Inflate(1, 1); shortRect.Inflate(1, 1); longRect.Inflate(1, 1); excludeRegion.Exclude(imageRect); excludeRegion.Exclude(shortRect); excludeRegion.Exclude(longRect); // Draw border and restore original clipping region context.Graphics.Clip = excludeRegion; base.RenderBorder(context); context.Graphics.Clip = clipRegion; }
0
13. Example
Project: Krypton
Source File: KryptonRibbon.cs
Source File: KryptonRibbon.cs
protected override void PaintBackground(Graphics g, Brush backBrush, Rectangle backRect) { // If we are using the composition area if (_compositionArea.Visible) { // Copy the current clipping Region oldClip = g.Clip.Clone(); // Exclude the composition area from the background painting g.SetClip(new Rectangle(_compositionArea.ClientLocation, new Size(_compositionArea.ClientWidth, _compositionArea.CompHeight)), CombineMode.Exclude); // Fill background g.FillRectangle(backBrush, backRect); // Dispose of the combined clip and use the old one again g.Clip.Dispose(); g.Clip = oldClip; } else g.FillRectangle(backBrush, backRect); }
0
14. Example
Project: winform.DropShadow
Source File: Dropshadow.cs
Source File: Dropshadow.cs
public void RefreshShadow(bool redraw = true) { if (redraw) { //ShadowBitmap = DrawShadow(); ShadowBitmap = DrawShadowBitmap(Owner.Width, Owner.Height, 0, ShadowBlur, ShadowSpread, ShadowColor); } //SetBitmap(ShadowBitmap, ShadowOpacity); UpdateLocation(); // ?????? //Region r = Region.FromHrgn(Win32.CreateRoundRectRgn(0, 0, Width, Height, BorderRadius, BorderRadius)); var r = new Region(new Rectangle(0, 0, Width, Height)); Region or; if (Owner.Region == null) or = new Region(Owner.ClientRectangle); else or = Owner.Region.Clone(); or.Translate(-OffsetX, -OffsetY); r.Exclude(or); Region = r; Owner.Refresh(); }
0
15. Example
Project: SharpBoot
Source File: SplitButton.cs
Source File: SplitButton.cs
private void PaintArrow(Graphics g) { var bounds = ClientRectangle; var buttonBounds = new Rectangle( bounds.Left + (bounds.Width - 19), bounds.Top + 2, 17, bounds.Height - (State != PushButtonState.Pressed ? 1 : 0) - 2 ); var buttonClip = buttonBounds; buttonClip.Inflate(-2, -2); using (var oldClip = g.Clip.Clone()) { g.SetClip(buttonClip, CombineMode.Intersect); try { ComboBoxRenderer.DrawDropDownButton(g, buttonBounds, getSt(State)); } catch { } g.SetClip(oldClip, CombineMode.Replace); } /* Point middle = new Point(Convert.ToInt32(dropDownRect.Left + dropDownRect.Width / 2), Convert.ToInt32(dropDownRect.Top + dropDownRect.Height / 2)); //if the width is odd - favor pushing it over one pixel right. middle.X += (dropDownRect.Width % 2); Point[] arrow = new[] { new Point(middle.X - 2, middle.Y - 1), new Point(middle.X + 3, middle.Y - 1), new Point(middle.X, middle.Y + 2) }; if (Enabled) g.FillPolygon(SystemBrushes.ControlText, arrow); else g.FillPolygon(SystemBrushes.ButtonShadow, arrow);*/ }
0
16. Example
Project: duality
Source File: SourcePaletteTilesetView.cs
Source File: SourcePaletteTilesetView.cs
protected override void OnPaintTiles(PaintEventArgs e) { Tileset tileset = this.TargetTileset.R/n ..... /n //View Source file for more details /n }
0
17. Example
Project: SharpBoot
Source File: GroupedComboBox.cs
Source File: GroupedComboBox.cs
internal static void DrawComboBox(Graphics graphics, Rectangle bounds, ComboBoxState state) { Rectangle comboBounds = bounds; comboBounds.Inflate(1, 1); ButtonRenderer.DrawButton(graphics, comboBounds, GetPushButtonState(state)); Rectangle buttonBounds = new Rectangle( bounds.Left + (bounds.Width - 17), bounds.Top, 17, bounds.Height - (state != ComboBoxState.Pressed ? 1 : 0) ); Rectangle buttonClip = buttonBounds; buttonClip.Inflate(-2, -2); using (Region oldClip = graphics.Clip.Clone()) { graphics.SetClip(buttonClip, System.Drawing.Drawing2D.CombineMode.Intersect); ComboBoxRenderer.DrawDropDownButton(graphics, buttonBounds, state); graphics.SetClip(oldClip, System.Drawing.Drawing2D.CombineMode.Replace); } }
0
18. Example
Project: referencesource
Source File: ConfigErrorGlyph.cs
Source File: ConfigErrorGlyph.cs
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, Activi/n ..... /n //View Source file for more details /n }
0
19. Example
Project: OpenNlp
Source File: SimpleRectangle.cs
Source File: SimpleRectangle.cs
public override void Paint(System.Drawing.Graphics g) { g.SmoothingMode = SmoothingMode.AntiAli/n ..... /n //View Source file for more details /n }