Grasshopper

algorithmic modeling for Rhino

Hi,

I would like to ask how to draw 24x24 icon for component within few lines of code in visual studio.

I just want to know how to draw a simple circle/ngon.

And is it possible to convert text to bitmap from string?

Views: 358

Replies to This Discussion

You can use GDI+ to draw any bitmap, though the drawing functions are limited compared to -say- Illustrator or Photoshop.

You'd start by first declaring the bitmap, then creating a Graphics object associated with it, next drawing all your shapes and finally disposing the graphics (to make sure all draw calls really end up on the bitmap, rather than in the cache).

I attached a file with a C# component which creates a new icon for itself based on the inputs.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service