Cleanup: rename curve align-x flags

This commit is contained in:
Campbell Barton
2016-06-21 12:44:49 +10:00
parent cb5a77253a
commit 994dd5c7c1
3 changed files with 18 additions and 18 deletions

View File

@@ -911,10 +911,10 @@ makebreak:
/* linedata is now: width of line */
if (cu->spacemode != CU_LEFT) {
if (cu->spacemode != CU_ALIGN_X_LEFT) {
ct = chartransdata;
if (cu->spacemode == CU_RIGHT) {
if (cu->spacemode == CU_ALIGN_X_RIGHT) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -926,7 +926,7 @@ makebreak:
ct++;
}
}
else if (cu->spacemode == CU_MIDDLE) {
else if (cu->spacemode == CU_ALIGN_X_MIDDLE) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -938,7 +938,7 @@ makebreak:
ct++;
}
}
else if ((cu->spacemode == CU_FLUSH) && use_textbox) {
else if ((cu->spacemode == CU_ALIGN_X_FLUSH) && use_textbox) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -959,7 +959,7 @@ makebreak:
ct++;
}
}
else if ((cu->spacemode == CU_JUSTIFY) && use_textbox) {
else if ((cu->spacemode == CU_ALIGN_X_JUSTIFY) && use_textbox) {
float curofs = 0.0f;
for (i = 0; i <= slen; i++) {
for (j = i;
@@ -1078,13 +1078,13 @@ makebreak:
/* path longer than text: spacemode involves */
distfac = 1.0f / distfac;
if (cu->spacemode == CU_RIGHT) {
if (cu->spacemode == CU_ALIGN_X_RIGHT) {
timeofs = 1.0f - distfac;
}
else if (cu->spacemode == CU_MIDDLE) {
else if (cu->spacemode == CU_ALIGN_X_MIDDLE) {
timeofs = (1.0f - distfac) / 2.0f;
}
else if (cu->spacemode == CU_FLUSH) {
else if (cu->spacemode == CU_ALIGN_X_FLUSH) {
distfac = 1.0f;
}
}

View File

@@ -322,11 +322,11 @@ enum {
/* Curve.spacemode */
enum {
CU_LEFT = 0,
CU_MIDDLE = 1,
CU_RIGHT = 2,
CU_JUSTIFY = 3,
CU_FLUSH = 4,
CU_ALIGN_X_LEFT = 0,
CU_ALIGN_X_MIDDLE = 1,
CU_ALIGN_X_RIGHT = 2,
CU_ALIGN_X_JUSTIFY = 3,
CU_ALIGN_X_FLUSH = 4,
};
/* Curve.align_y */

View File

@@ -954,11 +954,11 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_align_items[] = {
{CU_LEFT, "LEFT", 0, "Left", "Align text to the left"},
{CU_MIDDLE, "CENTER", 0, "Center", "Center text"},
{CU_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
{CU_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"},
{CU_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"},
{CU_ALIGN_X_LEFT, "LEFT", 0, "Left", "Align text to the left"},
{CU_ALIGN_X_MIDDLE, "CENTER", 0, "Center", "Center text"},
{CU_ALIGN_X_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
{CU_ALIGN_X_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"},
{CU_ALIGN_X_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"},
{0, NULL, 0, NULL, NULL}
};