473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Get Region From FillPie

Hi

I am drawing a pie like shape on a windows form in VB.NET using the FillPie
method as follows in the form Paint event:
e.Graphics.FillPie(brush, Me.ClientRectangle, pro.Angle, pro.Span)

How can I get back a System.Drawing.Region from the recently added pie?

Regards, Carl Gilbert
Nov 21 '05 #1
1 2432
Hi,

Use a graphics path to create the region

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim pth As New Drawing2D.GraphicsPath
Dim rgn As Region

pth.AddPie(Me.ClientRectangle, 45, 270)
rgn = New Region(pth)

e.Graphics.FillRegion(Brushes.Red, rgn)
End Sub

Ken
---------------
"Carl Gilbert" <mr*************@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi

I am drawing a pie like shape on a windows form in VB.NET using the
FillPie method as follows in the form Paint event:
e.Graphics.FillPie(brush, Me.ClientRectangle, pro.Angle, pro.Span)

How can I get back a System.Drawing.Region from the recently added pie?

Regards, Carl Gilbert

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
6
by: Jim | last post by:
Are #region a bad thing or are they good? As far as I see it #region's are a bad thing as they let lazy programmmers have large and bloated methods divided into regions that then appear as small...
4
by: Brian Basquille | last post by:
Hello all, Quick question! How would i keep a point inside a region? For example, the mouse pointer. You should be able to move the mouse around in this region but not anywhere outside it. ...
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
1
by: Sagaert Johan | last post by:
i have a control that uses a region to make it non rectangular when i try to to remove the region by calling this.Region.Makeinfinite() the control keeps its non rectangular Region. if i call...
0
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it possible to fill the interior of a pie section with an image? Currently I am using the FillPie method to fill a pie with colors, but I need to use images instead of colors. Is this...
2
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I'm filling a system.drawings.graphics object with color using the the FillPie method. I need to draw a PolygonHotSpot around that image. Is it possible to determine the coordinates...
1
by: Chris Thomasson | last post by:
This region allocator is not dynamic and can be fed with a buffer residing on the stack of the calling thread. Therefore, you can use this in an environment which does not have a heap; its...
8
by: Chris M. Thomasson | last post by:
Here is the initial crude implmentation which compiles under Comeau with no warnings: ___________________________________________________________________ #include <cassert> #include <cstdlib>...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.