Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. fireblade

    DrawString() - how to rotate ?

    You might also look at StringFormat as this sets a flag for drawing vertical text. StringFormat sf = new StringFormat (); sf.FormatFlags = StringFormatFlags.DirectionVertical; // Get the context g ... & string str, font, brush, x/y etc Point center; center = new Point (x,y); g.DrawString...
  2. fireblade

    .avi file creation in Linux

    Does anyone know of some source code in C or C++ that will convert a numbered set of .tga (24 bit uncompressed) files to an uncompressed .avi file ? I have studied the .avi format and written a program to do it, but when I play it back using xanim the animation is always 'stepped' as though I am...
  3. fireblade

    Errors upon running program

    Should 'while (!feof(outputfile))' really refer to the output file ? Testing for EOF on the input file seems more logical.
  4. fireblade

    Max number of windows in X

    I don't know what the maximum number of windows that can be created actually is - but on my SGI and Linux systems I create around 2500 without any strain on the systems at all. I suspect I could go on and on until memory ran out. An X-window of itself doesn't take much memory, but of course, it...
  5. fireblade

    Stupid question?

    Executables, libraries, dlls etc., created under Windows will not work directly on Unix platforms (unless you are using some kind of emulator, such as Wine). If your program (i.e source code) makes use of GUI/graphics code on Windows then it is unlikely to compile on Unix. You cannot use...
  6. fireblade

    help with command line input ....(unix)csh

    What heeryis & Zyrenthian say is right. Your code has argc and argv reversed which will definitely cause the program to fail. Switch 'em round.
  7. fireblade

    Creating Files From Structures-PROBLEM!!

    When you talk of a double digit, do you mean two digits or a digit of type double ? You set fTest to 23 and cTest to 20. These represent ASCII control characters; is this what you meant ? Do you want to set nTest to a numeric value ? If so, try sprintf. eg. sprintf (TEST_T.nTest...
  8. fireblade

    Memory leak in Xlib function Xcopyarea

    Yes, you should use XCopyArea for the repaint, I wasn't implying you shouldn't. I just thought that if XCopyArea was to blame for the memory leak, then other XCopyArea calls in your program would exhibit a memory leak too. And it is also true that if you are using the same pixmap to hold the...
  9. fireblade

    Memory leak in Xlib function Xcopyarea

    That last line in the above message was an error. Something else occurs to me. Silly, I know, but you do release the pixmap memory when you're through ? Yes, of course you do. Just thought I'd mention it 'cos it's the sort of thing I do ...
  10. fireblade

    Memory leak in Xlib function Xcopyarea

    Your code looks fine, though I notice that the window is not the same size as the pixmap - nothing wrong with that of course, so long as no part of the copied pixmap will extend outside of the bounds of the window. Other than that, all I can think of is the implementation of X-Windows under Red...
  11. fireblade

    Memory leak in Xlib function Xcopyarea

    I work with X-Windows a great deal and have never encountered the memory-leak problem you mention. Most expose events depend upon XCopyArea to repaint the exposed area and I suspect that if it was troublesome then memory leaks would go into the stratosphere ! I run on SGI workstations and PCs...
  12. fireblade

    Reading in integers only from a file.

    L1= (35,70) (35,4) L2 =(63,4) (75,91) I would read in an entire line as a string and then search the string for a ( character, copy the next set of characters to a buffer (i.e. a character string) until a ) is encountered. Continue searching for another ( and again place the characters into a...
  13. fireblade

    string to double cast operation..

    Or use sscanf (myString, "%lg", &myDouble);
  14. fireblade

    I want the sample file about rubik cube 's rotation of plane

    I'm not sure what you mean by rubik's cube rotation of a plane. To rotate a cube or a plane surface is easy in OpenGL, you have merely to set the rotation matrix and redraw the picture. Any book on OpenGL will show you how. Try www.sgi.com, (Developer's section). There are zillions of example...
  15. fireblade

    What is DarkBASIC?

    Try www.darkbasic.com for more info. I bought my copy from Amazon, on-line. They were doing a half-price deal a little while ago so it cost much less than a game. I believe that the people who produce DarkBasic will shortly be releasing a new, improved and faster version. I am not sure that...
  16. fireblade

    What is DarkBASIC?

    Yes, it is a form of BASIC but with lots of amazing, easy-to-implement goodies such as playing sound files, displaying graphic files (images on disk) and ability to generate 3D scenes and objects without having to know too much about 3D math (tho' some is needed). If you are writing programs...
  17. fireblade

    Reverse string

    oops, that should have been sprintf (text2, "%s", text);
  18. fireblade

    Reverse string

    I would use: /*Duplicate the new string*/ char* duplicate(char *text) { char *text2; text2 = (char *) malloc (strlen (text)+1); sprintf (text2, text); return text2; }//duplicate As far as I remember strcat doesn't add a zero byte to terminate the string but sprintf does. When a...
  19. fireblade

    Video API

    I want to produce a movie in the AVI or MOV or MPG format from a series of images (basically XImages or GLImages) which my program constructs. Currently, I simply send the images to an X or GL window one after another to produce an animated effect, but I would really like to save the animation...
  20. fireblade

    C++ newbie

    You do not need to know C in order to learn C++. Knowing C++ more or less means that you will know C. C++ is vastly more powerful and adopts a far better approach to programming - though of course, how an individual actually writes a program is as much down to a personal style as it is to the...

Part and Inventory Search

Back
Top