Search Results

Search found 144 results on 6 pages for 'user146780'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Having trouble compiling with GDI+ (VC++ 2008)

    - by user146780
    I just simply include gdiplus.h and get all these errors: Warning 32 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Warning 38 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Warning 49 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Warning 55 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Warning 61 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2224 Warning 68 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Warning 74 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2310 Warning 82 warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2321 Error 112 fatal error C1003: error count exceeds 100; stopping compilation c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 236 Error 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 74 Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 280 Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 280 Error 94 error C2761: '{ctor}' : member function redeclaration not allowed c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 195 Error 102 error C2761: '{ctor}' : member function redeclaration not allowed c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 212 Error 110 error C2761: '{ctor}' : member function redeclaration not allowed c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 231 Error 21 error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 813 Error 23 error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 820 Error 25 error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 829 Error 27 error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 923 Error 16 error C2535: 'Gdiplus::Image::Image(void)' : member function already defined or declared c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 471 Error 4 error C2470: 'IImageBytes' : looks like a function definition, but there is no parameter list; skipping apparent body c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 74 Error 89 error C2448: 'Gdiplus::Metafile::{ctor}' : function-style initializer appears to be a function definition c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 76 Error 97 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 199 Error 105 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 218 Error 2 error C2440: 'initializing' : cannot convert from 'const char [37]' to 'int' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 74 Error 72 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2310 Error 76 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2310 Error 80 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2321 Error 84 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2321 Error 92 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 195 Error 100 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 212 Error 108 error C2275: 'HDC' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 231 Error 60 error C2275: 'Gdiplus::MetafileHeader' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2224 Error 67 error C2275: 'Gdiplus::GpMetafile' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Error 31 error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Error 37 error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Error 48 error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Error 54 error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Error 3 error C2146: syntax error : missing ';' before identifier 'IImageBytes' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 74 Error 6 error C2146: syntax error : missing ';' before identifier 'id' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 280 Error 73 error C2146: syntax error : missing ')' before identifier 'referenceHdc' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2310 Error 81 error C2146: syntax error : missing ')' before identifier 'referenceHdc' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2321 Error 93 error C2146: syntax error : missing ')' before identifier 'referenceHdc' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 195 Error 101 error C2146: syntax error : missing ')' before identifier 'referenceHdc' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 212 Error 109 error C2146: syntax error : missing ')' before identifier 'referenceHdc' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 231 Error 96 error C2143: syntax error : missing ';' before '{' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 199 Error 104 error C2143: syntax error : missing ';' before '{' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 218 Error 33 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Error 39 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Error 50 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Error 56 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Error 62 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2224 Error 69 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Error 75 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2310 Error 83 error C2078: too many initializers c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2321 Error 29 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Error 35 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Error 46 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Error 52 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Error 58 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2222 Error 65 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Error 71 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2309 Error 79 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2320 Error 88 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 75 Error 91 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 194 Error 99 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 211 Error 107 error C2065: 'stream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 230 Error 66 error C2065: 'metafile' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Error 28 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Error 34 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Error 45 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Error 51 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Error 57 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2222 Error 64 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2262 Error 70 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2309 Error 78 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2320 Error 87 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 75 Error 90 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 194 Error 98 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 211 Error 106 error C2065: 'IStream' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 230 Error 30 error C2065: 'image' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1133 Error 36 error C2065: 'image' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1139 Error 59 error C2065: 'header' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2224 Error 47 error C2065: 'bitmap' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1286 Error 53 error C2065: 'bitmap' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1292 Error 12 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 443 Error 13 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 444 Error 14 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 445 Error 15 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 453 Error 41 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1244 Error 42 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1247 Error 43 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1250 Error 44 error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1262 Error 9 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 384 Error 10 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 395 Error 11 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 405 Error 17 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 505 Error 18 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 516 Error 19 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 758 Error 20 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 813 Error 22 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 820 Error 24 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 829 Error 26 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h 855 Error 40 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 1156 Error 63 error C2061: syntax error : identifier 'IStream' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2242 Error 86 error C2061: syntax error : identifier 'byte' c:\program files\microsoft sdks\windows\v7.0\include\gdipluspath.h 133 Error 5 error C2059: syntax error : 'public' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h 74 Error 77 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2316 Error 85 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h 2327 Error 95 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 198 Error 103 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 217 Error 111 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h 236 I tried updating my sdk to 7.0 but it did not help. I'm not even making any calls to the API. Thanks

    Read the article

  • Drawing continuously in drawing application

    - by user146780
    I was wondering how drawing applications draw the entire time the mouse is down without having empty gaps. What I mean is, for example if the program only drew circles at the mouse's X, y coordinate, then if the mouse went too quicly it would seem like a bunch of little circles rather than a nice continuous line. How can this be done without constantly drawing a short straight line between where the mouse was 0.001 seconds ago and where the mouse now is. Thanks

    Read the article

  • GDI+ is giving me errors

    - by user146780
    I want to use GDI + just to load a png. I included the headers and lib file then I do: Bitmap b; b.fromfile(filename); I get this from the compiler though. Error 1 error C2146: syntax error : missing ';' before identifier 'b' c:\users\josh\documents\visual studio 2008\projects\vectorizer project\vectorizer project\vectorizer project.cpp 23 Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\josh\documents\visual studio 2008\projects\vectorizer project\vectorizer project\vectorizer project.cpp 23 Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\josh\documents\visual studio 2008\projects\vectorizer project\vectorizer project\vectorizer project.cpp 23 Error 4 error C2440: '=' : cannot convert from 'const char [3]' to 'WCHAR *' c:\users\josh\documents\visual studio 2008\projects\vectorizer project\vectorizer project\vectorizer project.cpp 172 Error 5 error C2228: left of '.FromFile' must have class/struct/union c:\users\josh\documents\visual studio 2008\projects\vectorizer project\vectorizer project\vectorizer project.cpp 179 What is the correct way to do this? Thanks

    Read the article

  • OpenGL antialiasing not working

    - by user146780
    I'v been trying to anti alias with OGL. I found a code chunk that is supposed to do this but I see no antialiasing. I also reset my settings in Nvidia Control Panel but no luck. Does this code in fact antialias the cube? GLboolean polySmooth = GL_TRUE; static void init(void) { glCullFace (GL_BACK); glEnable (GL_CULL_FACE); glBlendFunc (GL_SRC_ALPHA_SATURATE, GL_ONE); glClearColor (0.0, 0.0, 0.0, 0.0); } #define NFACE 6 #define NVERT 8 void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1, GLdouble z0, GLdouble z1) { static GLfloat v[8][3]; static GLfloat c[8][4] = { {0.0, 0.0, 0.0, 1.0}, {1.0, 0.0, 0.0, 1.0}, {0.0, 1.0, 0.0, 1.0}, {1.0, 1.0, 0.0, 1.0}, {0.0, 0.0, 1.0, 1.0}, {1.0, 0.0, 1.0, 1.0}, {0.0, 1.0, 1.0, 1.0}, {1.0, 1.0, 1.0, 1.0} }; /* indices of front, top, left, bottom, right, back faces */ static GLubyte indices[NFACE][4] = { {4, 5, 6, 7}, {2, 3, 7, 6}, {0, 4, 7, 3}, {0, 1, 5, 4}, {1, 5, 6, 2}, {0, 3, 2, 1} }; v[0][0] = v[3][0] = v[4][0] = v[7][0] = x0; v[1][0] = v[2][0] = v[5][0] = v[6][0] = x1; v[0][1] = v[1][1] = v[4][1] = v[5][1] = y0; v[2][1] = v[3][1] = v[6][1] = v[7][1] = y1; v[0][2] = v[1][2] = v[2][2] = v[3][2] = z0; v[4][2] = v[5][2] = v[6][2] = v[7][2] = z1; #ifdef GL_VERSION_1_1 glEnableClientState (GL_VERTEX_ARRAY); glEnableClientState (GL_COLOR_ARRAY); glVertexPointer (3, GL_FLOAT, 0, v); glColorPointer (4, GL_FLOAT, 0, c); glDrawElements(GL_QUADS, NFACE*4, GL_UNSIGNED_BYTE, indices); glDisableClientState (GL_VERTEX_ARRAY); glDisableClientState (GL_COLOR_ARRAY); #else printf ("If this is GL Version 1.0, "); printf ("vertex arrays are not supported.\n"); exit(1); #endif } /* Note: polygons must be drawn from front to back * for proper blending. */ void display(void) { if (polySmooth) { glClear (GL_COLOR_BUFFER_BIT); glEnable (GL_BLEND); glEnable (GL_POLYGON_SMOOTH); glDisable (GL_DEPTH_TEST); } else { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDisable (GL_BLEND); glDisable (GL_POLYGON_SMOOTH); glEnable (GL_DEPTH_TEST); } glPushMatrix (); glTranslatef (0.0, 0.0, -8.0); glRotatef (30.0, 1.0, 0.0, 0.0); glRotatef (60.0, 0.0, 1.0, 0.0); drawCube(-0.5, 0.5, -0.5, 0.5, -0.5, 0.5); glPopMatrix (); glFlush (); } void reshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(30.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } void keyboard(unsigned char key, int x, int y) { switch (key) { case `t': case `T': polySmooth = !polySmooth; glutPostRedisplay(); break; case 27: exit(0); /* Escape key */ break; default: break; } } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_ALPHA | GLUT_DEPTH); glutInitWindowSize(200, 200); glutCreateWindow(argv[0]); init (); glutReshapeFunc (reshape); glutKeyboardFunc (keyboard); glutDisplayFunc (display); glutMainLoop(); return 0; } Thanks

    Read the article

  • Finding the centeroid of a polygon?

    - by user146780
    I have tried: for each vertex, add to total, divide by number of verities to get center. I'v also tried: Find the topmost, bottommost - get midpoint... find leftmost, rightmost, find midpoint. Both of these did not return the perfect center because I'm relying on the center to scale a polygon. I want to scale my polygons so I may put a border around them. What is the best way to find the centroid of a polygon given that the polygon may be concave, convex and have many many sides of various lengths. Thanks

    Read the article

  • How are VST Plugins made?

    - by user146780
    I would like to make (or learn how to make) VST plugins. Is there a special SDK for this? how does one yield a .vst instead of a .exe? Also, if one is looking to make Audio Units for Logic Pro, how is that done? Thanks

    Read the article

  • Help with this algorithm

    - by user146780
    I want to implement this algorithm here: http://bellard.org/pi/pi_n2/pi_n2.html but I don't understand a good part of it, and would like to understand. Could someone please put it in understandable words, psudocode, or C. Thanks.

    Read the article

  • How do bezier handles work?

    - by user146780
    On Wikipedia I found information about bezier curves and made a function to generate the inbetween points for a bezier polygon. I noticed that Expression Design uses bezier handles. This allows a circle to be made with 4 points each with a bezier handle. I'm just not sure mathematically how this works in relation with the formula for bezier point at time T. How do these handle vectors work to modify the shape? Basically what's there relation to the bezier formula? Thanks

    Read the article

  • Reading value at an address

    - by user146780
    I'm trying to make a program that reads the value at a certain address. I have this: int _tmain(int argc, _TCHAR* argv[]) { int *address; address = (int*)0x00000021; cout << *address; return 0; } But this gives a read violation error. What am I doing wrong? Thanks

    Read the article

  • Add newline to a text field (Win32)

    - by user146780
    I'm making a Notepad clone. Right now my text loads fine but where their are newline characters, they do not make newlines in the text field. I load it like this: void LoadText(HWND ctrl,HWND parent) { int leng; char buf[330000]; char FileBuffer[500]; memset(FileBuffer,0,500); FileBuffer[0] = '*'; FileBuffer[1] = '.'; FileBuffer[2] = 't'; FileBuffer[3] = 'x'; FileBuffer[4] = 't'; OPENFILENAMEA ofn; memset(&ofn, 0, sizeof(OPENFILENAMEA)); ofn.lStructSize = sizeof(OPENFILENAMEA); ofn.hwndOwner = parent; ofn.lpstrFile = FileBuffer; ofn.nMaxFile = 500; ofn.lpstrFilter = "Filetype (*.txt)\0\0"; ofn.lpstrDefExt = "txt"; ofn.Flags = OFN_EXPLORER; if(!GetOpenFileNameA(&ofn)) { return; } ifstream *file; file = new ifstream(FileBuffer,ios::in); int lenn; lenn = 0; while (!file->eof()) { buf[lenn] = file->get(); lenn += 1; } buf[lenn - 1] = 0; file->read(buf,lenn); SetWindowTextA(ctrl,buf); file->close(); } How can I make it do the new line characters? Thanks

    Read the article

  • Floodfill with "layers"

    - by user146780
    What I want is to create a vector drawing program with layers, but to avoid using transparency / opacity, I want to draw each shape from lowest layer to highest layer onto a single bitmap. For the filling, I want to floodfill the shape. My issue is that, if I have a shape that is drawn then floodfilled, then the next shape overlaps it a bit and that new shape's border is the same as the other one's then floodfill will only partially fill it. Is there a way given a shape's coordinates that I can find the actual bounds for floodfill rather than use a target color? Thanks

    Read the article

  • Algorithm to generate radial gradient

    - by user146780
    I have this algorithm here: pc = # the point you are coloring now p0 = # start point p1 = # end point v = p1 - p0 d = Length(v) v = Normalize(v) # or Scale(v, 1/d) v0 = pc - p0 t = Dot(v0, v) t = Clamp(t/d, 0, 1) color = (start_color * t) + (end_color * (1 - t)) to generate point to point linear gradients. It works very well for me. I was wondering if there was a similar algorithm to generate radial gradients. By similar, I mean one that solves for color at point P rather than solve for P at a certain color (where P is the coordinate you are painting). Thanks

    Read the article

  • Table is centering by itself?

    - by user146780
    I have a page here: http://animactions.ca/Animactions/accueil.php and it has a right column. When the right column's content is longer than then the main content, the main content centers rather than start at the top despite I defining it in a style not to do so. From my style sheet: .tbsyles { margin: 0px; text-align: justify; width: 200px; border-left-style: solid; border-left-width: 1px; border-left-color: #A8CFE4; padding-left: 30px; height: 100%; line-height: 100%; vertical-align: top; padding-right: 0px; } .tablestylea { width: 900px; margin: 0px; text-align: justify; height: 100%; line-height: 100%; vertical-align: top; padding-right: 0px; } How can I make it so no matter what the length of my right col content the main content page resizes correctly and starts from the top rather than from the center? Thanks

    Read the article

  • GLTessellator crashing

    - by user146780
    I'v followed a tutorial to get the GLU tesselator working. It woulds except the interpolation for colors of new points causes a crash (error reading from memory...) This is my callback where it crashes: void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **dataOut) { GLdouble *vertex; int i; vertex = (GLdouble *) malloc(6 * sizeof(GLdouble)); vertex[0] = coords[0]; vertex[1] = coords[1]; vertex[2] = coords[2]; //crashes here **for (int i = 3; i < 6; i++) { vertex[i] = weight[0] * vertex_data[0][i] + weight[1] * vertex_data[1][i] + weight[2] * vertex_data[2][i] + weight[3] * vertex_data[3][i]; }** //crashes here *dataOut = vertex; } I looked at memory when it crashes but can't put my finger on exactly what triggers it. I followed this tutorial: http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml Thanks

    Read the article

  • Polygonal gradients with OpenGL

    - by user146780
    I'm wondering how I could create a gradient wuth multiple stops and a direction if I'm making polygons. Right now I'm creating gradients by changing the color of the verticies but this is limiting. Is there another way to do this? Thanks

    Read the article

  • Gui's with Win32 API

    - by user146780
    I'm wondering what the correct way of creating Gui's in with Win32 API. Right now I just call the CreateWindowEx in my WM_CREATE event, but I don't think this is the right way to do it. Just as an example, what would be the correct way of adding a 100x20 EditField and getting text from it? Would you create it on WM_Create then use GetText()? Thanks

    Read the article

  • Column colapses on itself in IE

    - by user146780
    I have a column here: http://www.animactions.ca/contact.php It has contact information. Click contact a few times and you'll notice the text collapses itself. It happens randomly and I don't understand why? (only with Internet Explorer) Thanks

    Read the article

  • Issue with angular gradient algorithm

    - by user146780
    I have an angular gradient algorithm: GLuint OGLENGINEFUNCTIONS::CreateAngularGradient( std::vector<ARGBCOLORF> &input,POINTFLOAT start, POINTFLOAT end, int width, int height ) { std::vector<GLubyte> pdata(width * height * 4); float pi = 3.1415; float cx; float cy; float r1; float r2; float ang; float px; float py; float t; cx = start.x; cy = start.y; r1 = 0; r2 = 500; ang = end.x / 100; ARGBCOLORF color; for (unsigned int i = 0; i < height; i++) { for (unsigned int j = 0; j < width; j++) { px = j; py = i; if( px * px + py * py <= r2 * r2 && px * px + py * py >= r1 * r1 ) { t= atan2(py-cy,px-cx) + ang; t= t+ pi; if (t > 2* pi) { t=t-2*pi; t=t/(2*pi); } } //end + start color.r = (0 * t) + (120 * (1 - t)); color.g = (50 * t) + (255 * (1 - t)); color.b = (0 * t) + (50 * (1 - t)); color.a = (255 * t) + (200 * (1 - t)); pdata[i * 4 * width + j * 4 + 0] = (GLubyte) color.r; pdata[i * 4 * width + j * 4 + 1] = (GLubyte) color.g; pdata[i * 4 * width + j * 4 + 2] = (GLubyte) 12; pdata[i * 4 * width + j * 4 + 3] = (GLubyte) 255; } } It works fine except the ang variable only controls the end sweep, not the start sweep. The start sweep is always facing the middle left as seen here: http://img810.imageshack.us/img810/9623/uhoh.png Basically I have no control over the end one going this <- way. How could I control this one? Thanks

    Read the article

  • Help using GLOrtho

    - by user146780
    I resize my window like this: RECT clientRect; GetClientRect(mainWindow,&clientRect); glShadeModel(GL_SMOOTH); MoveWindow(framehWnd, toolWidth, tabHeight, ((clientRect.right - clientRect.left) - toolWidth) - rightRemainder , (clientRect.bottom - clientRect.top) - tabHeight - paramHeight, false); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho (0, ((clientRect.right - clientRect.left) - toolWidth) - rightRemainder , (clientRect.bottom - clientRect.top) - tabHeight - paramHeight , 0, 0, 1); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); This works fine except for one thing. Lets say I create a square at 0,0 to 100, 100. I'd like if I resize that it always stays at the top left but right now if I resize it gets pushed up or down instead of staying at the top left. What should I modify? Thanks *I just realized what really would need to happen is for the context to resize, but i'm not sure how to do this without throwing out the OGL context and re initing it.

    Read the article

  • Vertex array with GLUTessellator

    - by user146780
    I notice that every tutorial on setting up the GLUTesselator and its callbacks, use GlBegin, GlEnd and a vertex callback which uses glVertex. It seems to me like this makes it run in immediate mode right? That seems to me as inefficient. How could I set it up to use a vertex array? Could I just use the output from the vertex callback and then generate a vertex array from this data then submit it like I might usually do it? Or is there another, better way of doing this? Thanks

    Read the article

  • Drawing N-width lines?

    - by user146780
    Given a series of points, how could I calculate the vector for that line 5 pixels away? Ex: Given: \ \ \ How could I find the vector for \ \ \ \ \ \ The ones on the right. But bear in mind that it may not always be a nice straight line. I'm trying to figure out how programs like Flash can make thick outlines. Thanks

    Read the article

1 2 3 4 5 6  | Next Page >