Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:56:01+00:00 2026-06-11T05:56:01+00:00

quote from other post: Call Graphics.FillPolygon() . You will need a brush rather than

  • 0

quote from other post:

Call Graphics.FillPolygon(). You will need a brush rather than a pen and you must put your points into a point array Point[].

The sample code from MSDN is like this:

// Create solid brush.
SolidBrush^ blueBrush = gcnew SolidBrush( Color::Blue );  

// Create points that define polygon.  
Point point1 = Point(50,50);  
Point point2 = Point(100,25);  
Point point3 = Point(200,5);       
Point point4 = Point(250,50);  
Point point5 = Point(300,100);  
Point point6 = Point(350,200);  
Point point7 = Point(250,250);  
array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6,point7}; 

This is awful! I have to put in a hundred equidistant points!

Draw polygon to screen.

e->Graphics->FillPolygon( blueBrush, curvePoints );

I have tried many things:

array<Point,2>^ aPoints;
//Points tabPoints[10][10];//= new Points[10][10];
Points = gcnew array<Point,2>(10,10);
//init des tableaux 

for (int i = 0;i<10;i++)
{
    for(int j =0;j<10;j++)
    {
    //tabPoints[i][j].pX =i*10;
    //tabPoints[i][j].pY = j * 10;
    // = new Points(i*10,j*10);
    aPoints[i,j]= new Point(i*20,j*20);
    }
}  

None of them work!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:56:03+00:00Added an answer on June 11, 2026 at 5:56 am

    A 2-D array isn’t necessarily what you want, but you can make your current code work with just one minor change:

    • Get rid of new inside the loop. You want a Point value, not a pointer to one.

    MSDN had that part right already.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I quote this post from exubero's entry. I think this entry will benefit everyone
In addition to this quite old post , I need something that will use
Quote from Wikipedia : A public key token. This is a 64-bit hash of
Quote from Head first html: You can add padding to the top and bottom
Quote from Jason Coco it not possible to set multiple in UILabel... but how
Quote from hib official docs: Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method.
I would like to trim a beginning and ending double quote () from a
From 2.13.2/3 The double quote and the question mark ? , can be represented
I am making a page that accepts post data from any number of pages
Looked at several post on stackoverflow as well as other sources (online + ANT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.