[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Ring Of Light

Posted on 2006-11-02
5
Medium Priority
?
273 Views
Last Modified: 2010-04-16
If i wanted to create a circle of light say 700 p hight and 700p wide, the center of the ring would be transparent and so would everything on the outer side of the ring...

How could i do this?
0
Comment
Question by:schenkp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 17860462
Like making an irregular shaped form the shape of a Music CD?
0
 

Author Comment

by:schenkp
ID: 17861126
Yes....it to be touching the outer edges of a sqaure form, like a box with the ring around it.
0
 
LVL 15

Accepted Solution

by:
ozymandias earned 2000 total points
ID: 17861335
Very basic example :

using System;
using System.Drawing;


namespace Drawing1
{
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
      {
            
            [STAThread]
            static void Main(string[] args)
            {
                  Bitmap b = new Bitmap(710,710);
                  b.MakeTransparent(Color.WhiteSmoke);
                  Graphics g = Graphics.FromImage(b);
                  g.Clear(Color.WhiteSmoke);
                  g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
                  g.DrawEllipse(new Pen(Brushes.White, 6f), 5 , 5, 700, 700);
                  b.Save(new System.IO.FileStream(@"c:\temp\lightring.gif",System.IO.FileMode.Create), System.Drawing.Imaging.ImageFormat.Gif);      
            }
      }
}
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17861346
This gives you a 710 x 710 transparent gif in the middle of which is a 700 diameter white circle.
0
 

Author Comment

by:schenkp
ID: 17866906
How do i use this as a class?  Or rather how can i put it into a test project.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 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