|
What is the best way to draw a variable width line without using glLineWidth? Just draw a rectangle? Various parallel lines? None of the above?
Started by Decio Lira on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Note that for large line widths you'll get weird endpoint ....
This the simple naive way.
You can draw two triangles:
// Draws a line between (x1,y1) - (x2,y2) with a start quads/tris to draw it.
line algorithm.
|
|
Hey
I have to draw a dotted or dashed line In a JComponent. How do I do that?
Started by tomjen on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It should be enough with a BasicStroke to get a dotted line, nothing fancy..
To set a suitable stroke.
|
|
I need to draw a line grid on a windows form that contains 4 rows and 4 columns.
Started by burntsugar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Have a look at: How to: Draw a Line on a Windows Form
If you want something for controlling layout(); grphx.Clear(this.BackColor); for(int i=1; i<5; i++) { //Draw verticle line grphx.DrawLine(linePen, rather than a simple....
|
Ask your Facebook Friends
|
In vb.net i would like to draw a regular line on a form. is there a control to do this?
Started by every_answer_gets_a_point on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Locate "Line Shape" on the .Net Framework Components tab..
Or else you can manually draw using GDI:
Dim myPen As New Items...".
Border gives a nice chiseled effect).
|
|
Hi;
How can i draw dotted line with css? i searched but could not find.
thanks
Started by Kaveh on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Style="border-bottom: 1px dotted #ff0000;".
Class="horizontal_dotted_line"></div>
and in styles.css:
.horizontal_dotted_line{ border following line to the element you want to have dotted line.
|
|
I create HPEN using WinAPI GDI method:
HPEN hPen = CreatePen(PS_DOT, 1, color);
Then draw line using the methods MoveToEx and LineTo .
In fact drawn line is dashed . 3 pixels empty, 3 pixels with color -- dashed line.
Why PS_DOT style doesn't draw dotted...
Answer Snippets (Read the full thread at stackoverflow):
I then walked the bit and used setpixel for the 'on' bits .
For line rendering which used a bit pattern.
|
|
I want to draw line between two points in my view how it possible.?
Edit:ya thax.i have got solution. Line draw perfectly.I want to draw multiple line with different points.I am using for loop and every rotaion i pass the start and end points.but only...
Started by Mansi on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Apple has some to your first point....
CGContextAddLineToPoint(context, 50.0, 10.0); // tell the context to draw the stroked line CGContextStrokePath(context);
This example would draw a horizontal white line with a thickness of 2.
|
|
Hi, I draw some lines on a SDI application in visual c++, these lines are disappeared whenenver a new line or the size of the windo is changed, any clue how to keep these lines visible all the time?
thanks.
RZ
Started by reonze on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You must draw the lines in the OnPaint() function - this is called every time the window needs.
|
|
What's the best practice for drawing a closed, filled path where each line has a different stroke?
Started by Claus Wahlers on
, 3 posts
by 2 people.
Answer Snippets (Read the full thread at stackoverflow):
Fill the complete path, then iterate on its elements to stroke one line segment for every lineto), there's a much simpler way: Set the line dash , then fill and stroke as normal..
|
|
Is it possible to draw a line using a graduated colour?
I want to be able to draw a stright or a curved line (if possible) where one end of the line is Blue and the other Red.
Further There might be a beed to have more than one gradient per-line e.g the...
Started by TK on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try looking at the LinearGradientBrush
protected override....
You will need to use System.Drawing.Drawing2D.LinearGradientBrush instead of System.Drawing.SolidBrush
example:
e.Graphics.DrawLine(new Pen(new System.Drawing.Drawing2D.LinearGradientBrush(.. .
|