Lines Matching refs:layout
161 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, samePaint, in TEST() local
163 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
165 layout = mt->buildLayout(text, Range(0, 1), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
167 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
168 EXPECT_TRUE(layout.getFont(0)); in TEST()
169 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
170 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
171 EXPECT_EQ(10.0f, layout.getAdvance()); in TEST()
172 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
173 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
174 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), layout.getBounds()); in TEST()
176 layout = mt->buildLayout(text, Range(0, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
178 ASSERT_EQ(2u, layout.nGlyphs()); in TEST()
179 EXPECT_TRUE(layout.getFont(0) && layout.getFont(0) == layout.getFont(1)); in TEST()
180 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
181 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
182 EXPECT_EQ(10.0f, layout.getX(1)); in TEST()
183 EXPECT_EQ(0.0f, layout.getY(1)); in TEST()
184 EXPECT_EQ(20.0f, layout.getAdvance()); in TEST()
185 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
186 EXPECT_EQ(10.0f, layout.getCharAdvance(1)); in TEST()
187 EXPECT_EQ(2u, layout.getAdvances().size()); in TEST()
188 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), layout.getBounds()); in TEST()
190 layout = mt->buildLayout(text, Range(1, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
192 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
193 EXPECT_TRUE(layout.getFont(0)); in TEST()
194 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
195 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
196 EXPECT_EQ(10.0f, layout.getAdvance()); in TEST()
197 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
198 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
199 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), layout.getBounds()); in TEST()
201 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, samePaint, in TEST()
203 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
204 EXPECT_TRUE(layout.getFont(0)); in TEST()
206 EXPECT_EQ(layout.getFont(0), layout.getFont(i)) << i; in TEST()
207 EXPECT_EQ(10.0f * i, layout.getX(i)) << i; in TEST()
208 EXPECT_EQ(0.0f, layout.getY(i)) << i; in TEST()
209 EXPECT_EQ(10.0f, layout.getCharAdvance(i)) << i; in TEST()
211 EXPECT_EQ(130.0f, layout.getAdvance()); in TEST()
212 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()
213 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 130.0f, 0.0f), layout.getBounds()); in TEST()
235 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, samePaint, in TEST() local
237 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
239 layout = mt->buildLayout(text, Range(0, 1), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
241 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
242 EXPECT_TRUE(layout.getFont(0)); in TEST()
243 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
244 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
245 EXPECT_EQ(10.0f, layout.getAdvance()); in TEST()
246 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
247 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
248 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), layout.getBounds()); in TEST()
250 layout = mt->buildLayout(text, Range(0, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
252 ASSERT_EQ(2u, layout.nGlyphs()); in TEST()
253 EXPECT_TRUE(layout.getFont(0) && layout.getFont(0) == layout.getFont(1)); in TEST()
254 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
255 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
256 EXPECT_EQ(10.0f, layout.getX(1)); in TEST()
257 EXPECT_EQ(0.0f, layout.getY(1)); in TEST()
258 EXPECT_EQ(20.0f, layout.getAdvance()); in TEST()
259 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
260 EXPECT_EQ(10.0f, layout.getCharAdvance(1)); in TEST()
261 EXPECT_EQ(2u, layout.getAdvances().size()); in TEST()
262 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), layout.getBounds()); in TEST()
264 layout = mt->buildLayout(text, Range(1, 2), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
266 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
267 EXPECT_TRUE(layout.getFont(0)); in TEST()
268 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
269 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
270 EXPECT_EQ(10.0f, layout.getAdvance()); in TEST()
271 EXPECT_EQ(10.0f, layout.getCharAdvance(0)); in TEST()
272 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
273 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), layout.getBounds()); in TEST()
275 layout = mt->buildLayout(text, Range(7, 7), fullContext, samePaint, StartHyphenEdit::NO_EDIT, in TEST()
277 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
281 layout = mt->buildLayout(text, Range(7, 8), fullContext, samePaint2, StartHyphenEdit::NO_EDIT, in TEST()
283 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
284 EXPECT_TRUE(layout.getFont(0)); in TEST()
285 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
286 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
287 EXPECT_EQ(20.0f, layout.getAdvance()); in TEST()
288 EXPECT_EQ(20.0f, layout.getCharAdvance(0)); in TEST()
289 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
290 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 20.0f, 0.0f), layout.getBounds()); in TEST()
308 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, differentPaint, in TEST() local
310 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
312 layout = mt->buildLayout(text, Range(0, 1), fullContext, differentPaint, in TEST()
314 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
315 EXPECT_TRUE(layout.getFont(0)); in TEST()
316 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
317 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
318 EXPECT_EQ(20.0f, layout.getAdvance()); in TEST()
319 EXPECT_EQ(20.0f, layout.getCharAdvance(0)); in TEST()
320 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
321 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 20.0f, 0.0f), layout.getBounds()); in TEST()
323 layout = mt->buildLayout(text, Range(0, 2), fullContext, differentPaint, in TEST()
325 ASSERT_EQ(2u, layout.nGlyphs()); in TEST()
326 EXPECT_TRUE(layout.getFont(0) && layout.getFont(0) == layout.getFont(1)); in TEST()
327 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
328 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
329 EXPECT_EQ(20.0f, layout.getX(1)); in TEST()
330 EXPECT_EQ(0.0f, layout.getY(1)); in TEST()
331 EXPECT_EQ(40.0f, layout.getAdvance()); in TEST()
332 EXPECT_EQ(20.0f, layout.getCharAdvance(0)); in TEST()
333 EXPECT_EQ(20.0f, layout.getCharAdvance(1)); in TEST()
334 EXPECT_EQ(2u, layout.getAdvances().size()); in TEST()
335 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 40.0f, 0.0f), layout.getBounds()); in TEST()
337 layout = mt->buildLayout(text, Range(1, 2), fullContext, differentPaint, in TEST()
339 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
340 EXPECT_TRUE(layout.getFont(0)); in TEST()
341 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
342 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
343 EXPECT_EQ(20.0f, layout.getAdvance()); in TEST()
344 EXPECT_EQ(20.0f, layout.getCharAdvance(0)); in TEST()
345 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
346 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 20.0f, 0.0f), layout.getBounds()); in TEST()
348 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, differentPaint, in TEST()
350 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
351 EXPECT_TRUE(layout.getFont(0)); in TEST()
353 EXPECT_EQ(layout.getFont(0), layout.getFont(i)) << i; in TEST()
354 EXPECT_EQ(20.0f * i, layout.getX(i)) << i; in TEST()
355 EXPECT_EQ(0.0f, layout.getY(i)) << i; in TEST()
356 EXPECT_EQ(20.0f, layout.getCharAdvance(i)) << i; in TEST()
358 EXPECT_EQ(260.0f, layout.getAdvance()); in TEST()
359 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()
360 EXPECT_EQ(MinikinRect(0.0f, 20.0f, 260.0f, 0.0f), layout.getBounds()); in TEST()
382 Layout layout = mt->buildLayout(text, Range(0, 0), fullContext, differentPaint, in TEST() local
384 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
386 layout = mt->buildLayout(text, Range(0, 1), fullContext, differentPaint, in TEST()
388 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
389 EXPECT_TRUE(layout.getFont(0)); in TEST()
390 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
391 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
392 EXPECT_EQ(30.0f, layout.getAdvance()); in TEST()
393 EXPECT_EQ(30.0f, layout.getCharAdvance(0)); in TEST()
394 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
395 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 30.0f, 0.0f), layout.getBounds()); in TEST()
397 layout = mt->buildLayout(text, Range(0, 2), fullContext, differentPaint, in TEST()
399 ASSERT_EQ(2u, layout.nGlyphs()); in TEST()
400 EXPECT_TRUE(layout.getFont(0) && layout.getFont(0) == layout.getFont(1)); in TEST()
401 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
402 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
403 EXPECT_EQ(30.0f, layout.getX(1)); in TEST()
404 EXPECT_EQ(0.0f, layout.getY(1)); in TEST()
405 EXPECT_EQ(60.0f, layout.getAdvance()); in TEST()
406 EXPECT_EQ(30.0f, layout.getCharAdvance(0)); in TEST()
407 EXPECT_EQ(30.0f, layout.getCharAdvance(1)); in TEST()
408 EXPECT_EQ(2u, layout.getAdvances().size()); in TEST()
409 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 60.0f, 0.0f), layout.getBounds()); in TEST()
411 layout = mt->buildLayout(text, Range(1, 2), fullContext, differentPaint, in TEST()
413 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
414 EXPECT_TRUE(layout.getFont(0)); in TEST()
415 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
416 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
417 EXPECT_EQ(30.0f, layout.getAdvance()); in TEST()
418 EXPECT_EQ(30.0f, layout.getCharAdvance(0)); in TEST()
419 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
420 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 30.0f, 0.0f), layout.getBounds()); in TEST()
422 layout = mt->buildLayout(text, Range(7, 7), fullContext, differentPaint, in TEST()
424 EXPECT_EQ(0u, layout.nGlyphs()); in TEST()
426 layout = mt->buildLayout(text, Range(7, 8), fullContext, differentPaint, in TEST()
428 ASSERT_EQ(1u, layout.nGlyphs()); in TEST()
429 EXPECT_TRUE(layout.getFont(0)); in TEST()
430 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
431 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
432 EXPECT_EQ(30.0f, layout.getAdvance()); in TEST()
433 EXPECT_EQ(30.0f, layout.getCharAdvance(0)); in TEST()
434 EXPECT_EQ(1u, layout.getAdvances().size()); in TEST()
435 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 30.0f, 0.0f), layout.getBounds()); in TEST()
437 layout = mt->buildLayout(text, Range(6, 8), fullContext, differentPaint, in TEST()
439 ASSERT_EQ(2u, layout.nGlyphs()); in TEST()
440 EXPECT_TRUE(layout.getFont(0) && layout.getFont(0) == layout.getFont(1)); in TEST()
441 EXPECT_EQ(0.0f, layout.getX(0)); in TEST()
442 EXPECT_EQ(0.0f, layout.getY(0)); in TEST()
443 EXPECT_EQ(30.0f, layout.getX(1)); in TEST()
444 EXPECT_EQ(0.0f, layout.getY(1)); in TEST()
445 EXPECT_EQ(60.0f, layout.getAdvance()); in TEST()
446 EXPECT_EQ(30.0f, layout.getCharAdvance(0)); in TEST()
447 EXPECT_EQ(30.0f, layout.getCharAdvance(1)); in TEST()
448 EXPECT_EQ(2u, layout.getAdvances().size()); in TEST()
449 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 60.0f, 0.0f), layout.getBounds()); in TEST()
451 layout = mt->buildLayout(text, Range(0, text.size()), fullContext, differentPaint, in TEST()
453 ASSERT_EQ(text.size(), layout.nGlyphs()); in TEST()
454 EXPECT_TRUE(layout.getFont(0)); in TEST()
456 EXPECT_EQ(layout.getFont(0), layout.getFont(i)) << i; in TEST()
457 EXPECT_EQ(30.0f * i, layout.getX(i)) << i; in TEST()
458 EXPECT_EQ(0.0f, layout.getY(i)) << i; in TEST()
459 EXPECT_EQ(30.0f, layout.getCharAdvance(i)) << i; in TEST()
461 EXPECT_EQ(390.0f, layout.getAdvance()); in TEST()
462 EXPECT_EQ(text.size(), layout.getAdvances().size()); in TEST()
463 EXPECT_EQ(MinikinRect(0.0f, 30.0f, 390.0f, 0.0f), layout.getBounds()); in TEST()