Exemplo n.º 1
0
int main(int argc, char **argv)
{
  testInit(argc, argv, 400,400, "ShivaVG: Linear Gradient Test");
  testCallback(TEST_CALLBACK_DISPLAY, (CallbackFunc)display);
  testCallback(TEST_CALLBACK_BUTTON, (CallbackFunc)click);
  testCallback(TEST_CALLBACK_DRAG, (CallbackFunc)drag);
  testCallback(TEST_CALLBACK_KEY, (CallbackFunc)key);
  testCallback(TEST_CALLBACK_RESHAPE, (CallbackFunc)reshape);
  
  p = testCreatePath();
  org = testCreatePath();
  
  blackFill = vgCreatePaint();
  vgSetParameterfv(blackFill, VG_PAINT_COLOR, 4, black);
  
  backImage = createImageFromJpeg(IMAGE_DIR"test_img_violin.jpg");
  patternImage = createImageFromJpeg(IMAGE_DIR"test_img_shivavg.jpg");
  patternFill = vgCreatePaint();
  
  createSquare(p);
  createOrigin(org);
  createPattern();
  
  testOverlayString("Press H for a list of commands");
  testOverlayColor(1,1,1,1);
  testRun();
  
  return EXIT_SUCCESS;
}
Exemplo n.º 2
0
void initMain(TMain *Main, int width, int height) {
	Main->work = 1;
	background_image = createImageFromJpeg("skin/background.jpg");
	Main->width = width;
	Main->height = height;
	Main->mX = 29;
	Main->mY = 20;
}
Exemplo n.º 3
0
// Image places an image at the specifed location
void Image(VGfloat x, VGfloat y, int w, int h, const char *filename) {
	VGImage img = createImageFromJpeg(filename);
	vgSetPixels(x, y, img, 0, 0, w, h);
	vgDestroyImage(img);
}
Exemplo n.º 4
0
void initPhotos(TWidget *Widget, TMain *Main) {
	bg = createImageFromJpeg("skin/photos.jpg");
}
Exemplo n.º 5
0
void initTime(TWidget *Widget, TMain *Main) {
	bg = createImageFromJpeg("skin/time.jpg");
}
Exemplo n.º 6
0
void initBells(TWidget *Widget, TMain *Main) {
	bg = createImageFromJpeg("skin/bells.jpg");
}
Exemplo n.º 7
0
void initLesson(TWidget *Widget, TMain *Main) {
	bg = createImageFromJpeg("skin/lesson.jpg");
	loadLessons();
}