16 "title" :
"VuoSceneText",
34 unsigned int vertexCount = 4;
36 VuoPoint4d *positions = (VuoPoint4d *)malloc(
sizeof(VuoPoint4d) * vertexCount);
42 VuoPoint4d *textureCoordinates = (VuoPoint4d *)malloc(
sizeof(VuoPoint4d) * vertexCount);
48 unsigned int elementCount = 6;
49 unsigned int *elements = (
unsigned int *)malloc(
sizeof(
unsigned int) * elementCount);
62 for(
int i = 0; i < vertexCount; i++)
64 positions[i].x += horizontal;
65 positions[i].y += vertical;
69 positions, NULL, NULL, NULL, textureCoordinates,
104 h = VuoHorizontalAlignment_Left;
106 h = VuoHorizontalAlignment_Center;
108 h = VuoHorizontalAlignment_Right;
111 v = VuoVerticalAlignment_Top;
113 v = VuoVerticalAlignment_Center;
115 v = VuoVerticalAlignment_Bottom;
127 if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Center, VuoVerticalAlignment_Center))
129 return (VuoPoint2d){0, 0};
136 for (
int i = 0; i < 4; ++i)
138 corners[i].x *= -2. / viewportWidth;
139 corners[i].y *= -2. / viewportWidth;
143 double width = fmax(fabs(corners[2].x - corners[0].x), fabs(corners[3].x - corners[1].x));
144 double height = fmax(fabs(corners[2].y - corners[0].y), fabs(corners[3].y - corners[1].y));
145 if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Left, VuoVerticalAlignment_Top))
150 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Left, VuoVerticalAlignment_Center))
152 (corners[0].x + corners[3].x)/2,
153 -((corners[0].y + corners[3].y)/2 + height/2.)
155 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Left, VuoVerticalAlignment_Bottom))
158 -(corners[3].y + height)
160 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Center, VuoVerticalAlignment_Top))
162 (corners[0].x + corners[1].x)/2 + width/2.,
163 -(corners[0].y + corners[1].y)/2
165 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Center, VuoVerticalAlignment_Bottom))
167 (corners[2].x + corners[3].x)/2 + width/2.,
168 -((corners[2].y + corners[3].y)/2 + height)
170 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Right, VuoVerticalAlignment_Top))
172 corners[1].x + width,
175 else if (a ==
VuoAnchor_make(VuoHorizontalAlignment_Right, VuoVerticalAlignment_Center))
177 (corners[1].x + corners[2].x)/2 + width,
178 -((corners[1].y + corners[2].y)/2 + height/2.)
182 corners[2].x + width,
183 -(corners[2].y + height)