|
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
|
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.
|
|
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.
|
|
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(.. .
|
|
Is it possible to draw curved lines in an HTML page (normally across cells in a table) using JavaScript (for web graph control)?
Started by Ramesh Vel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Excanvas.sourceforge.net/
Raphael.js is a javascript library that lets you draw vector graphics.
|
|
So I've been messing around with http://processingjs.org/ .
I want to draw a circle that has a bunch of lines protruding from it. Each of these lines should perpendicular to the tangent of the circle.
I don't necessarily need to know how to do this in...
Started by icco on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Cheers
I suggest you forget about the tangent and draw a line from the centerIf the line is perpendicular to a tangent to the circle, it would pass through the center at angle t, then the start points are x1=....
Them to its center.
|
|
Hi
In WPF is there a way that you can modify the way any path is drawn APART from "Dash-Dot" sequences? Say I want draw a triple line for any path I am drawing or small triangles,waves..etc on the drawing path itself. I have tried Brushes but it will ...
Started by Chandimal on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Are you specificly looking for a triple-line path, if desired Combine the side line geomerty with original geometry using a CombinedGeometry Stroke the combined geometry to get a triple....
Composite Path objects or fancy code-behind gymnastics.
|
|
I have a need to do some drawing using win32/GDI (Native, not .NET), and I've run into the following problem:
I need to draw lines that are "styled." For example, in the attached image, the line marked "A" is a straight line as far as my application data...
Started by JT on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Sure, it will take....
The only line options you have are dash-patterns, compound-pens, dash caps, end caps, and fill hard to do this however.
See this.
The points used to make up the line or curve which should make it substantially easier.
|