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_STRIP, 0, num_points);
glDisableClientState(GL_VERTEX_ARRAY);
It looks good in t...
In javascript, I am trying to draw a line that is at an angle that is user defined.
Basically, I have a point (x,y) and an angle to create the next point at. The length of the line need to be 10px.
Let's say that the point to start with is (180, 200)... if I give it angle "A" and the (I guess)hypotenuse is 10, what would my equation(s...
Hello all,
I'm developing a website with server-side JScript engine over ASP server.
I have several try-catch clauses in my code looking roughly like this:
try {
// do something
}
catch (err) {
// pass it to the frontend code
die("Exception caught: " + err.description);
}
I would very much like to display the line number in ...
hi i'm having this html markup
<body>
<table border="0" width="50%" align="center">
<tr>
<td>
<center>
and i'm trying to find a "wildcard" for the linebreaks to reach the <center> tag - how would this work?
thx
...
in VBScript, I've got a function like:
Function InsertPerson(FirstName, LastName, Street1, Street2, City, State, Zip, x, y, z, a, b, c, d, e)
When I try to compile this function, I get an "Identifier Expected" error. However, if I shorten the list of parameters, it works fine.
Is there such a thing as TOO long a list of parameters?
...
Hi Geeks,
It seems my current JTextArea instance is having line-spcing about 1 or 1.5. Can anybody tell me how to change the line-spacing in JTextArea instance?
...
Hello,
I'm implementing a small game and am having trouble getting the physics working properly.
In this game, there is one ball (a circle which moves from frame to frame, and may change radius) and several walls (line segments which also change and move from frame to frame). I can detect collisions properly, and making the ball bounce ...
Hello,
I am trying to write some code that will open a file, read its content line by line and store each of these lines into an array.
First I open the file and count the number of lines, each of the lines is of a fixed length so I simply do this :
char buf2[LINE_LENGTH];
int in2 = open("toSend2", O_RDONLY);
int number_o...
Hi everyone,
I have a problem. I used Gridbaglayout in my JFrame. One of the component is JPanel.
I wanted to draw a gridline as a background for my JPanel. e.g in the program below, it supposed to produce 3 vertical and 3 horizontal lines, however it only shows 2 vertical and 2 horizontal line. the last line was not shown.
Another pro...
How can one delete the very last line of a file via python?
Example File:
hello
world
foo
bar
Resulatant File:
hello
world
foo
I've created the following code to find the number of lines in the file - but I do not know how to delete the specific line number. I'm new to python - so if there is an easier way - please tell me.
try:...
I want to display in a UItableViewCell, text like
line1
line2
I get it from an xml tag like line1 line2
I've tried a lot of things, like:
<br/> (also <br>),
\n which only displays "line1 \n line2",
<![CDATA[<br >]]> which only displays "line1 <br> line2".
Thanks for the help
...
Hi, I'm looking for a nice and efficient implementation of Xiaolin Wu's anti-aliased line drawing algorithm in C, does anyone have this code they could share with me?
Thanks
...
I've read in a text file and converted each line into a list.
using this script:
l = [s.strip().split() for s in open("cluster2.wcnf").readlines()]
How would i go about :
the file it opens is dynamic rather than static? i.e. the user
chooses the file to open.
Select specific lines to read after it has been converted to a list.
assi...
Hi,
In ZS 5 you can highlight a line by clicking on the line number in red. This persists when you move the cursor to another line. I use this as a bookmark.
Is it possible to highlight a line in this manner in ZS 7?
Thanks.
...
I want to plot a line from one well-defined point to another and then turn it into an image matrix to use a Gaussian filter on it for smoothing. For this I use the functions line and getframe to plot a line and capture the figure window in an image, but getframe is very slow and not very reliable. I noticed that it does not capture anyth...
I am generating C code based on information provided by another file (an XML file). Certain chunks of C are included in this XML file and should be included verbatim in my generated C file. I wish to use the #line directive, so that if these chunks contain an error, the user will see the line number in the XML file that the chunk came fr...
I have an array of CGPoints (basic struct with two floats: x and y). I want to use OpenGL ES to draw a textured curve using these points. I can do this fine with just two points, but it gets harder when I need to make a line from several points.
Currently I draw a line horizontally, calculate its angle from the points given, and then ro...
I have a table followed by an anchor tag. I want the anchor tag not to move to next line after the table.
What are the options?
...
I have a jsp with lots of javascript code. Whenever there is a javascript error on the page, shown in the status bar of the IE browser, the line number reported to contain the error, does not match with the line number that actually contains the error.
I am doing a right click>view source to find the line number reported. But that line d...
I'm making an arcade game in as3 and I want to draw pixely(unsmoothed by flash) lines. I'm drawing the pixels 'by hand'(not with flash's lineTo or anything) onto a bitmapdata object.
The lines don't appear quite right though, when zoomed out the line is rendered 2 pixels thick at some parts. However by zooming it its apparent that t...