Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void barChart (void)
- {
- GLint month, k, h;
- glClear(GL_COLOR_BUFFER_BIT); // Чисте вікно зображення.
- glColor3f (1.0, 0.0, 0.0);
- /* Червоний колір прямокутників. */
- for (k = 0; k < 12; k++)
- glRecti (20 + k*50, 165, 40 + k*50, dataValue [k]); glColor3f (0.0, 0.0, 0.0); // Чорний колір тексту.
- xRaster = 20;
- /* Відображення підписів на діаграмі. */
- for (month = 0; month < 12; month++)
- {
- glRasterPos2i (xRaster, yRaster);
- for (h = 3*month; h < 3*month + 3; h++)
- {
- glutBitmapCharacter (GLUT_BITMAP_HELVETICA_12,label[h]);
- xRaster += 50;
- }
- glFlush ( );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement