|
I'm interested in doing some drawing using JavaScript. I'll get straight to an example:
The green horizontal line would be static, and all the vertical lines would be clickable. An example of a clicked line would be the red one.
I've seen many API's, ...
Started by ptrn on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This site seems: I would use the canvas element to draw your lines; you would also need to store the coordinates of your lines in a ....
Use the code to understand how to draw lines and make a simpler one for yourself.
|
|
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):
The only line options....
See For a bezier curve you would use Path Functions :
BeginPath PolyBezier EndPath FlattenPath For straight lines this.
The points used to make up the line or curve which should make it substantially easier.
|
|
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):
The reason your lines are vanishing is probably due to the standard behaviour of OnDraw(), which.
You must draw the lines in the OnPaint() function - this is called every time the window needs OnPaint.
|
Ask your Facebook Friends
|
Hi, I am working on a CAD application and thinking of using WPF for rendering my entities. But it seems like WPF doesnt support drawing 3D lines. Is there any ways for drawing 3D lines in WPF? I dont like to create a mesh for each line entity I need to...
Started by CadPro on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I seem to remember 3D Tools for WPF working rather well a few years... .
If you're married to using C#, SharpGL will let you call OpenGL functions from C# .
You will want to use something lower-level like OpenGL.
WPF is not a good tool for rendering CAD data .
|
|
What is a good approach for drawing lines between elements in WPF?
I have a view in my application with several buttons that make up a diagram. They scale and move depending on the view's size and shape. I would like to indicate a relationship between...
Started by emddudley on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
My solution was to use a Grid with a Canvas and ... .
This is established, drawing the line should be a matter of overriding OnRender , finding the position of each child control, and using the DrawingContext to draw the line.
|
|
I have a canvas tag, I use it draw lines on that, the canvas is a square. I use "space" to record the space between two lines. and I have canvasWidth and canvasHight to record the canvas size, actually, they are the same numnber....320
var x=0; for (var...
Started by Ted Wong on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Here is my example html:
<!DOCTYPE....
What browser are you using?
The problem does not seem to be in the code you've shown, because it works fine for me .
Why do you use parseInt, is your space variable has type of string? If not, try to remove parseInt .
|
|
Hi,
I'm using Quartz-2D for iPhone to display a route on a map. The route is colored according to temperature. Because some streets are colored yellow, I am using a slightly thicker black line under the route line to create a border effect, so that yellow...
Started by Leonard on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try drawing with flat end caps and see the pixels covered....
Pixels.)
Instead of drawing two lines, could you just draw one and use the Shadows ability ?
ThanksSounds like it might be something to do with the line caps.
|
|
Normally, you'd use something like:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); glVertexPointer(2, GL_FLOAT, 0, points); glEnableClientState(GL_VERTEX_ARRAY); glDrawArrays(GL_LINE...
Started by quano on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
One approach around this limitation is tessellating your lines into textured triangle strips.
You can draw using CGPaths and a CGContextRef, but that will be significantly slower this works.
On the iPhone.
|
|
Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class.
For instance, the following array of points...
[0]: (0,0) [1]: (100,0) [2]: (0,100) [3]: (100,100)
...describes a line that resembles a Z.
But here ...
Started by Bernhof on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
From this you may calculate the angle of....
This is the function I use to draw a rectangle with rounded corners...
This url has a description of how to draw rounded rectangles that might help you start out that might work out of the air :).
|
|
Hello,
I've seen there's a lot of libraries that will allow me to output shapes and lines but do these libraries allow for freehand drawing using the mouse?
I want to allow users to draw and then to save their work to database.
Is this possible?
Thanks...
Started by Jeff on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Maybe I'm overlooking ....
There is Processing.js that allows days ago.
There was a question similar to this a few months ago http://stackoverflow.com/questions/96486/javascript-drawing-library .
drawing library
You can do it using canvas.
|