Lines Matching refs:q

41     static void draw_quarter_0(quarter_draw_dsc_t * q);
42 static void draw_quarter_1(quarter_draw_dsc_t * q);
43 static void draw_quarter_2(quarter_draw_dsc_t * q);
44 static void draw_quarter_3(quarter_draw_dsc_t * q);
230 static void draw_quarter_0(quarter_draw_dsc_t * q) in draw_quarter_0() argument
232 const lv_area_t * clip_area_ori = q->draw_ctx->clip_area; in draw_quarter_0()
235 if(q->start_quarter == 0 && q->end_quarter == 0 && q->start_angle < q->end_angle) { in draw_quarter_0()
237 …quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius - q->width)) >> LV_TR… in draw_quarter_0()
238 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_0()
240 … quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->end_angle) * q->radius) >> LV_TRIGO_SHIFT); in draw_quarter_0()
241 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_0()
245 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_0()
246 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_0()
249 else if(q->start_quarter == 0 || q->end_quarter == 0) { in draw_quarter_0()
251 if(q->start_quarter == 0) { in draw_quarter_0()
252 quarter_area.x1 = q->center->x; in draw_quarter_0()
253 quarter_area.y2 = q->center->y + q->radius; in draw_quarter_0()
255 …quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius - q->width)) >> LV_TR… in draw_quarter_0()
256 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_0()
260 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_0()
261 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_0()
264 if(q->end_quarter == 0) { in draw_quarter_0()
265 quarter_area.x2 = q->center->x + q->radius; in draw_quarter_0()
266 quarter_area.y1 = q->center->y; in draw_quarter_0()
268 … quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->end_angle) * q->radius) >> LV_TRIGO_SHIFT); in draw_quarter_0()
269 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_0()
273 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_0()
274 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_0()
278 …else if((q->start_quarter == q->end_quarter && q->start_quarter != 0 && q->end_angle < q->start_an… in draw_quarter_0()
279 (q->start_quarter == 2 && q->end_quarter == 1) || in draw_quarter_0()
280 (q->start_quarter == 3 && q->end_quarter == 2) || in draw_quarter_0()
281 (q->start_quarter == 3 && q->end_quarter == 1)) { in draw_quarter_0()
283 quarter_area.x1 = q->center->x; in draw_quarter_0()
284 quarter_area.y1 = q->center->y; in draw_quarter_0()
285 quarter_area.x2 = q->center->x + q->radius; in draw_quarter_0()
286 quarter_area.y2 = q->center->y + q->radius; in draw_quarter_0()
290 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_0()
291 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_0()
294 q->draw_ctx->clip_area = clip_area_ori; in draw_quarter_0()
297 static void draw_quarter_1(quarter_draw_dsc_t * q) in draw_quarter_1() argument
299 const lv_area_t * clip_area_ori = q->draw_ctx->clip_area; in draw_quarter_1()
302 if(q->start_quarter == 1 && q->end_quarter == 1 && q->start_angle < q->end_angle) { in draw_quarter_1()
304 … quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius)) >> LV_TRIGO_SHIFT); in draw_quarter_1()
305 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius - q->width)) >> … in draw_quarter_1()
307 …quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->end_angle) * (q->radius - q->width)) >> LV_TRIG… in draw_quarter_1()
308 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius)) >> LV_TRIGO_SHIF… in draw_quarter_1()
312 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_1()
313 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_1()
316 else if(q->start_quarter == 1 || q->end_quarter == 1) { in draw_quarter_1()
318 if(q->start_quarter == 1) { in draw_quarter_1()
319 quarter_area.x1 = q->center->x - q->radius; in draw_quarter_1()
320 quarter_area.y1 = q->center->y; in draw_quarter_1()
322 … quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius)) >> LV_TRIGO_SHIFT); in draw_quarter_1()
323 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius - q->width)) >> … in draw_quarter_1()
327 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_1()
328 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_1()
331 if(q->end_quarter == 1) { in draw_quarter_1()
332 quarter_area.x2 = q->center->x - 1; in draw_quarter_1()
333 quarter_area.y2 = q->center->y + q->radius; in draw_quarter_1()
335 …quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->end_angle) * (q->radius - q->width)) >> LV_TRIG… in draw_quarter_1()
336 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius)) >> LV_TRIGO_SHIF… in draw_quarter_1()
340 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_1()
341 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_1()
345 …else if((q->start_quarter == q->end_quarter && q->start_quarter != 1 && q->end_angle < q->start_an… in draw_quarter_1()
346 (q->start_quarter == 0 && q->end_quarter == 2) || in draw_quarter_1()
347 (q->start_quarter == 0 && q->end_quarter == 3) || in draw_quarter_1()
348 (q->start_quarter == 3 && q->end_quarter == 2)) { in draw_quarter_1()
350 quarter_area.x1 = q->center->x - q->radius; in draw_quarter_1()
351 quarter_area.y1 = q->center->y; in draw_quarter_1()
352 quarter_area.x2 = q->center->x - 1; in draw_quarter_1()
353 quarter_area.y2 = q->center->y + q->radius; in draw_quarter_1()
357 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_1()
358 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_1()
361 q->draw_ctx->clip_area = clip_area_ori; in draw_quarter_1()
364 static void draw_quarter_2(quarter_draw_dsc_t * q) in draw_quarter_2() argument
366 const lv_area_t * clip_area_ori = q->draw_ctx->clip_area; in draw_quarter_2()
369 if(q->start_quarter == 2 && q->end_quarter == 2 && q->start_angle < q->end_angle) { in draw_quarter_2()
371 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_2()
372 …quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius - q->width)) >> LV_TR… in draw_quarter_2()
374 … quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->end_angle) * q->radius) >> LV_TRIGO_SHIFT); in draw_quarter_2()
375 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_2()
379 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_2()
380 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_2()
383 else if(q->start_quarter == 2 || q->end_quarter == 2) { in draw_quarter_2()
385 if(q->start_quarter == 2) { in draw_quarter_2()
386 quarter_area.x2 = q->center->x - 1; in draw_quarter_2()
387 quarter_area.y1 = q->center->y - q->radius; in draw_quarter_2()
389 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_2()
390 …quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius - q->width)) >> LV_TR… in draw_quarter_2()
394 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_2()
395 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_2()
398 if(q->end_quarter == 2) { in draw_quarter_2()
399 quarter_area.x1 = q->center->x - q->radius; in draw_quarter_2()
400 quarter_area.y2 = q->center->y - 1; in draw_quarter_2()
402 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_2()
403 … quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->end_angle) * (q->radius)) >> LV_TRIGO_SHIFT); in draw_quarter_2()
407 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_2()
408 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_2()
412 …else if((q->start_quarter == q->end_quarter && q->start_quarter != 2 && q->end_angle < q->start_an… in draw_quarter_2()
413 (q->start_quarter == 0 && q->end_quarter == 3) || in draw_quarter_2()
414 (q->start_quarter == 1 && q->end_quarter == 3) || in draw_quarter_2()
415 (q->start_quarter == 1 && q->end_quarter == 0)) { in draw_quarter_2()
417 quarter_area.x1 = q->center->x - q->radius; in draw_quarter_2()
418 quarter_area.y1 = q->center->y - q->radius; in draw_quarter_2()
419 quarter_area.x2 = q->center->x - 1; in draw_quarter_2()
420 quarter_area.y2 = q->center->y - 1; in draw_quarter_2()
424 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_2()
425 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_2()
428 q->draw_ctx->clip_area = clip_area_ori; in draw_quarter_2()
431 static void draw_quarter_3(quarter_draw_dsc_t * q) in draw_quarter_3() argument
433 const lv_area_t * clip_area_ori = q->draw_ctx->clip_area; in draw_quarter_3()
436 if(q->start_quarter == 3 && q->end_quarter == 3 && q->start_angle < q->end_angle) { in draw_quarter_3()
438 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius - q->width)) >> … in draw_quarter_3()
439 … quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius)) >> LV_TRIGO_SHIFT); in draw_quarter_3()
441 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius)) >> LV_TRIGO_SHIF… in draw_quarter_3()
442 …quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->end_angle) * (q->radius - q->width)) >> LV_TRIG… in draw_quarter_3()
446 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_3()
447 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_3()
450 else if(q->start_quarter == 3 || q->end_quarter == 3) { in draw_quarter_3()
452 if(q->start_quarter == 3) { in draw_quarter_3()
453 quarter_area.x2 = q->center->x + q->radius; in draw_quarter_3()
454 quarter_area.y2 = q->center->y - 1; in draw_quarter_3()
456 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius - q->width)) >> … in draw_quarter_3()
457 … quarter_area.y1 = q->center->y + ((lv_trigo_sin(q->start_angle) * (q->radius)) >> LV_TRIGO_SHIFT); in draw_quarter_3()
461 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_3()
462 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_3()
465 if(q->end_quarter == 3) { in draw_quarter_3()
466 quarter_area.x1 = q->center->x; in draw_quarter_3()
467 quarter_area.y1 = q->center->y - q->radius; in draw_quarter_3()
469 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius)) >> LV_TRIGO_SHIF… in draw_quarter_3()
470 …quarter_area.y2 = q->center->y + ((lv_trigo_sin(q->end_angle) * (q->radius - q->width)) >> LV_TRIG… in draw_quarter_3()
474 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_3()
475 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_3()
479 …else if((q->start_quarter == q->end_quarter && q->start_quarter != 3 && q->end_angle < q->start_an… in draw_quarter_3()
480 (q->start_quarter == 2 && q->end_quarter == 0) || in draw_quarter_3()
481 (q->start_quarter == 1 && q->end_quarter == 0) || in draw_quarter_3()
482 (q->start_quarter == 2 && q->end_quarter == 1)) { in draw_quarter_3()
484 quarter_area.x1 = q->center->x; in draw_quarter_3()
485 quarter_area.y1 = q->center->y - q->radius; in draw_quarter_3()
486 quarter_area.x2 = q->center->x + q->radius; in draw_quarter_3()
487 quarter_area.y2 = q->center->y - 1; in draw_quarter_3()
491 q->draw_ctx->clip_area = &quarter_area; in draw_quarter_3()
492 lv_draw_rect(q->draw_ctx, q->draw_dsc, q->draw_area); in draw_quarter_3()
496 q->draw_ctx->clip_area = clip_area_ori; in draw_quarter_3()