Solved

NEED HELP FAST

Posted on 2006-11-06
1
208 Views
Last Modified: 2011-09-20
Hi I am useing the following code to draw a circle

            this.TransparencyKey = Color.WhiteSmoke;
            this.BackColor = Color.WhiteSmoke;
            this.Refresh();
            Graphics g = this.CreateGraphics();
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;        
            g.DrawArc(new Pen(Brushes.Blue, 6f), 5, 5, 700, 700, 0, 90);
            g.DrawArc(new Pen(Brushes.Red, 6f), 5, 5, 700, 700, 90, 90);
            g.DrawArc(new Pen(Brushes.Yellow, 6f), 5, 5, 700, 700, 180, 90);
           g.DrawArc(new Pen(Brushes.Green, 6f), 5, 5, 700, 700, 270, 90);

but i am tring to have the following colors in 90' segments starting with 0' if 0' was due north... all the way around the circle....

green 315 - 45
blue 45 - 135
red 135 - 225
yellow 225-315
0
Comment
Question by:schenkp
1 Comment
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 17886798
Hi schenkp;

I think that these are the values you are looking for.

      g.DrawArc(new Pen(Brushes.Blue, 6f), 5, 5, 700, 700, 315, 90);
      g.DrawArc(new Pen(Brushes.Red, 6f), 5, 5, 700, 700, 45, 90);
      g.DrawArc(new Pen(Brushes.Yellow, 6f), 5, 5, 700, 700, 135, 90);
      g.DrawArc(new Pen(Brushes.Green, 6f), 5, 5, 700, 700, 225, 90);

Fernando
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now