Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to work by reference object in remoting Pin
Pete O'Hanlon19-Mar-10 3:00
mvePete O'Hanlon19-Mar-10 3:00 
QuestionFilling a cylinder Pin
Valeriant19-Mar-10 2:04
Valeriant19-Mar-10 2:04 
AnswerRe: Filling a cylinder Pin
Eddy Vluggen19-Mar-10 8:38
professionalEddy Vluggen19-Mar-10 8:38 
GeneralRe: Filling a cylinder Pin
Valeriant19-Mar-10 17:01
Valeriant19-Mar-10 17:01 
GeneralRe: Filling a cylinder Pin
Dave Kreskowiak19-Mar-10 18:25
mveDave Kreskowiak19-Mar-10 18:25 
GeneralRe: Filling a cylinder Pin
Eddy Vluggen20-Mar-10 1:00
professionalEddy Vluggen20-Mar-10 1:00 
GeneralRe: Filling a cylinder Pin
Valeriant20-Mar-10 2:27
Valeriant20-Mar-10 2:27 
GeneralRe: Filling a cylinder Pin
Eddy Vluggen20-Mar-10 3:58
professionalEddy Vluggen20-Mar-10 3:58 
Valeriant wrote:
How do I calculate the position?


The same way that .NET calculates where to draw the dots that form the upper and lower circle.


Valeriant wrote:
How do I move to the black pixel?


The simplest way that I can think of would be doing a GetPixel()[^] to the right. It may be located higher or lower than the pixel that you started from.

Valeriant wrote:
Can you give an example in C#?


This CodeProject-article[^] might get you started Smile | :)


Valeriant wrote:
Slower because it paints n lines compare to just filling a region?


For that you'd first have to define the region to be filled. You can use the FloodFill-algorithm, for example, that would fill everything from a certain point until it "hits" some other color-boundary. Drawing a line is a very fast operation btw.


Valeriant wrote:
(I could have lots of cylinder to draw).


May I suggest that you don't try to draw 3D-objects, but move to WPF/XAML[^] or XNA[^]? These make managing 3D objects a lot easier, plus that they have painting-routines that are optimized to misuse any graphics card available.

WPF would be the way to go if the 3D-objects are displayed in an Office-kind of environment, XNA the route if the 3D-objects are used in a game-like interface.

Hope this helps Smile | :)
I are Troll Suspicious | :suss:

GeneralRe: Filling a cylinder Pin
Valeriant21-Mar-10 5:00
Valeriant21-Mar-10 5:00 
QuestionHow do I 'drive' a command line utility beyond executing a single process / command? Pin
Mouldiwarp19-Mar-10 1:28
Mouldiwarp19-Mar-10 1:28 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
Calla19-Mar-10 1:52
Calla19-Mar-10 1:52 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
#realJSOP19-Mar-10 1:52
mve#realJSOP19-Mar-10 1:52 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
Luc Pattyn19-Mar-10 2:52
sitebuilderLuc Pattyn19-Mar-10 2:52 
GeneralRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
PIEBALDconsult19-Mar-10 3:56
mvePIEBALDconsult19-Mar-10 3:56 
GeneralRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
PIEBALDconsult30-Mar-10 14:04
mvePIEBALDconsult30-Mar-10 14:04 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
PIEBALDconsult19-Mar-10 3:53
mvePIEBALDconsult19-Mar-10 3:53 
GeneralRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
Mouldiwarp19-Mar-10 4:35
Mouldiwarp19-Mar-10 4:35 
GeneralRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
PIEBALDconsult30-Mar-10 14:00
mvePIEBALDconsult30-Mar-10 14:00 
GeneralRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
Mouldiwarp30-Mar-10 22:54
Mouldiwarp30-Mar-10 22:54 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
PIEBALDconsult5-Apr-10 13:54
mvePIEBALDconsult5-Apr-10 13:54 
QuestionUnformatted text in grid row when saved from rich txt box [modified] Pin
MathewPV19-Mar-10 0:56
MathewPV19-Mar-10 0:56 
AnswerRe: Unformatted text in grid row when saved from rich txt box Pin
Calla19-Mar-10 1:25
Calla19-Mar-10 1:25 
AnswerRe: Unformatted text in grid row when saved from rich txt box Pin
MathewPV19-Mar-10 1:34
MathewPV19-Mar-10 1:34 
GeneralRe: Unformatted text in grid row when saved from rich txt box Pin
Calla19-Mar-10 1:37
Calla19-Mar-10 1:37 
GeneralRe: Unformatted text in grid row when saved from rich txt box Pin
MathewPV21-Mar-10 18:57
MathewPV21-Mar-10 18:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.