vkvg_move_to(ctx,100,100);
vkvg_line_to(ctx,100,200);
- vkvg_line_to(ctx,100,100);
+ vkvg_line_to(ctx,100,300);
vkvg_stroke(ctx);
vkvg_destroy(ctx);
vkvg_destroy(ctx);
}
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
- if (action != GLFW_PRESS)
+ if (action == GLFW_RELEASE)
return;
switch (key) {
case GLFW_KEY_ESCAPE :
else
miterLimit *= 2.0f;
break;
+ case GLFW_KEY_P :
+ if (mods & GLFW_MOD_SHIFT) {
+ if (ptsCount > 1)
+ ptsCount--;
+ } else {
+ if (ptsCount < initPtsCount)
+ ptsCount++;
+ }
+ break;
case GLFW_KEY_KP_ADD :
- if (ptsCount < initPtsCount)
- ptsCount++;
+ lineWidth++;
break;
case GLFW_KEY_KP_SUBTRACT :
- if (ptsCount > 1)
- ptsCount--;
+ if (lineWidth > 1)
+ lineWidth--;
break;
}
}
printf("\t\t\tif the -d option is not specified, svgfile path is mandatory.\n");
printf("\t-i size:\tif -d option is present, display all svg files as a list with the size specified.\n");
printf("\t-m margin:\tset margin for the -i option\n");
+ printf("\t-w width:\tset output surface width.\n");
+ printf("\t-h height:\tset output surface height.\n");
+ printf("\t-s samples:\tset sample count, set to 1 to disable multisampling.\n");
printf("\n");
exit(-1);
}