Adding Star definitions to shapes.

This commit is contained in:
Pere Pujal i Carabantes 2014-10-19 23:33:51 +00:00
parent 783b0ef9ab
commit bc1fe2d6fe
2 changed files with 174 additions and 20 deletions

View file

@ -49,6 +49,12 @@ enum
SHAPE_RHOMBUS_FILL,
SHAPE_OCTAGON,
SHAPE_OCTAGON_FILL,
SHAPE_TRIANGLE_STAR,
SHAPE_TRIANGLE_STAR_FILL,
SHAPE_RHOMBUS_STAR,
SHAPE_RHOMBUS_STAR_FILL,
SHAPE_PENTAGON_STAR,
SHAPE_PENTAGON_STAR_FILL,
NUM_SHAPES
};
@ -71,7 +77,13 @@ const int shape_sides[NUM_SHAPES] = {
4, /* Rhombus */
4, /* Rhombus */
8, /* Octagon */
8 /* Octagon */
8, /* Octagon */
3, /* 3 points star*/
3, /* 3 points star*/
4, /* 4 points star*/
4, /* 4 points star*/
5, /* 5 points star*/
5 /* 5 points star*/
};
@ -93,7 +105,13 @@ const int shape_locked[NUM_SHAPES] = {
0, /* Rhombus */
0, /* Rhombus */
1, /* Octagon */
1 /* Octagon */
1, /* Octagon */
0, /* 3 points star*/
0, /* 3 points star*/
0, /* 4 points star*/
0, /* 4 points star*/
0, /* 5 points star*/
0 /* 5 points star*/
};
@ -115,7 +133,13 @@ const int shape_filled[NUM_SHAPES] = {
0, /* Rhombus */
1, /* Rhombus */
0, /* Octagon */
1 /* Octagon */
1, /* Octagon */
0, /* 3 points star*/
1, /* 3 points star*/
0, /* 4 points star*/
1, /* 4 points star*/
0, /* 5 points star*/
1 /* 5 points star*/
};
@ -138,7 +162,13 @@ const int shape_init_ang[NUM_SHAPES] = {
0, /* Rhombus */
0, /* Rhombus */
22, /* Octagon */
22 /* Octagon */
22, /* Octagon */
210, /* 3 points star*/
210, /* 3 points star*/
0, /* 4 points star*/
0, /* 4 points star*/
162, /* 5 points star */
162 /* 5 points star */
};
@ -160,7 +190,40 @@ const int shape_no_rotate[NUM_SHAPES] = {
0, /* Rhombus */
0, /* Rhombus */
0, /* Octagon */
0 /* Octagon */
0, /* Octagon */
0, /* 3 points star */
0, /* 3 points star */
0, /* 4 points star */
0, /* 4 points star */
0, /* 5 points star */
0 /* 5 points star */
};
/* Valley of stars in percent of size */
const int shape_valley[NUM_SHAPES] = {
100, /* Square */
100, /* Square */
100, /* Rectangle */
100, /* Rectangle */
100, /* Circle */
100, /* Circle */
100, /* Ellipse */
100, /* Ellipse */
100, /* Triangle */
100, /* Triangle */
100, /* Pentagon */
100, /* Pentagon */
100, /* Rhombus */
100, /* Rhombus */
100, /* Octagon */
100, /* Octagon */
20, /* 3 points star */
20, /* 3 points star */
30, /* 4 points star */
30, /* 4 points star */
35, /* 5 points star */
35 /* 5 points star */
};
@ -197,7 +260,26 @@ const char *const shape_names[NUM_SHAPES] = {
// Octagon shape tool (8 sides)
gettext_noop("Octagon"),
gettext_noop("Octagon")
gettext_noop("Octagon"),
// Triangle star (3 points star)
gettext_noop("3p Star"),
// Triangle star (3 points star)
gettext_noop("3p Star"),
// Rhombus star (4 points star)
gettext_noop("4p Star"),
// Rhombus star (4 points star)
gettext_noop("4p Star"),
// Pentagone star (5 points star)
gettext_noop("5p Star"),
// Pentagone star (5 points star)
gettext_noop("5p Star")
};
@ -240,7 +322,15 @@ const char *const shape_tips[NUM_SHAPES] = {
gettext_noop
("An octagon has eight equal sides."),
gettext_noop
("An octagon has eight equal sides.")
("An octagon has eight equal sides."),
gettext_noop("A star with 3 points."),
gettext_noop("A star with 3 points."),
gettext_noop("A star with 4 points."),
gettext_noop("A star with 4 points."),
gettext_noop("A star with 5 points."),
gettext_noop("A star with 5 points.")
};
@ -262,5 +352,12 @@ const char *const shape_img_fnames[NUM_SHAPES] = {
DATA_PREFIX "images/shapes/diamond.png",
DATA_PREFIX "images/shapes/diamond_f.png",
DATA_PREFIX "images/shapes/octagon.png",
DATA_PREFIX "images/shapes/octagon_f.png"
DATA_PREFIX "images/shapes/octagon_f.png",
DATA_PREFIX "images/shapes/rectangle.png",
DATA_PREFIX "images/shapes/rectangle.png",
DATA_PREFIX "images/shapes/rectangle.png",
DATA_PREFIX "images/shapes/rectangle.png",
DATA_PREFIX "images/shapes/rectangle.png",
DATA_PREFIX "images/shapes/rectangle.png"
};