MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_renderer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
29 #ifndef LEGATO_RENDERER_H
30 #define LEGATO_RENDERER_H
31 
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
42 #include "gfx/driver/gfx_driver.h"
44 
45 
46 // *****************************************************************************
47 
48 
49 typedef struct leGradient
50 {
51  leColor c0;
52  leColor c1;
53  leColor c2;
54  leColor c3;
55 } leGradient;
56 
57 struct leLayerState;
58 
59 /* internal use only */
64 leResult leRenderer_Initialize(const gfxDisplayDriver* dispDriver,
65  const gfxGraphicsProcessor* gpuDriver);
66 
67 // internal use only
68 void leRenderer_Shutdown(void);
74 // *****************************************************************************
75 /* Function:
76  const gfxDisplayDriver* leRenderer_DisplayInterface(void)
77 
78  Summary:
79  Returns the pointer to the display driver interface that the renderer was
80  initialized with.
81 
82  Description:
83  Returns the pointer to the display driver interface that the renderer was
84  initialized with.
85 
86  Returns:
87  const gfxDisplayDriver* - the display driver interface
88 */
89 const gfxDisplayDriver* leRenderer_DisplayInterface(void);
90 
91 // *****************************************************************************
92 /* Function:
93  const gfxGraphicsProcessor* leRenderer_GPUInterface(void)
94 
95  Summary:
96  Returns the pointer to the GPU driver interface that the renderer was
97  initialized with.
98 
99  Description:
100  Returns the pointer to the GPU driver interface that the renderer was
101  initialized with.
102 
103  Returns:
104  const gfxGraphicsProcessor* - the GPU driver interface
105 */
106 const gfxGraphicsProcessor* leRenderer_GPUInterface(void);
107 
108 // *****************************************************************************
109 /* Function:
110  leResult leRenderer_DamageArea(const leRect* rect)
111 
112  Summary:
113  Damages a section of a display layer. The renderer will redraw it as part
114  of the next draw cycle.
115 
116  Description:
117  Damages a section of a display layer. The renderer will redraw it as part
118  of the next draw cycle.
119 
120  Parameters:
121  const leRect* rect - the rectangle area to damage
122  uint32_t layerIdx - the layer to damage
123 
124  Returns:
125  leResult
126 */
127 leResult leRenderer_DamageArea(const leRect* rect, uint32_t layerIdx);
128 
129 // internal use only
130 void leRenderer_Paint(void);
131 
132 // *****************************************************************************
133 /* Function:
134  leBool leRenderer_IsIdle(void);
135 
136  Summary:
137  Returns LE_TRUE if there is no frame in progress
138 
139  Description:
140  Returns LE_TRUE if there is no frame in progress
141 
142  Parameters:
143 
144  Returns:
145  leBool - true if the renderer is idle
146 */
147 leBool leRenderer_IsIdle(void);
148 
149 // *****************************************************************************
150 /* Function:
151  size_t leRenderer_GetDrawCount(void);
152 
153  Summary:
154  Returns the number of frames the renderer has drawn
155 
156  Description:
157  Returns the number of frames the renderer has drawn
158 
159  Parameters:
160 
161  Returns:
162  size_t - the number of frames drawn
163 */
164 size_t leRenderer_GetDrawCount(void);
165 
166 // *****************************************************************************
167 /* Function:
168  void leRenderer_GetDisplaySize(leSize* sz);
169 
170  Summary:
171  Returns the size of the display as reported by the display driver.
172 
173  Description:
174  Returns the size of the display as reported by the display driver. This
175  function does not test the pointer for validity
176 
177  Parameters:
178  leSize* sz - pointer to an leSize object
179 
180  Returns:
181  void
182 */
183 void leRenderer_DisplaySize(leSize* sz);
184 
185 // *****************************************************************************
186 /* Function:
187  leRect leRenderer_GetClipRect(void);
188 
189  Summary:
190  Returns a rectangle containing the current clipping area.
191 
192  Description:
193  Returns a rectangle containing the current clipping area. Should only be called
194  during frame rendering. This function does not test the pointer for validity
195 
196  Parameters:
197  leRect* rct - pointer to an leRect object
198 
199  Returns:
200  void
201 */
202 void leRenderer_GetClipRect(leRect* rct);
203 
204 // *****************************************************************************
205 /* Function:
206  leRect leRenderer_GetFrameRect(void);
207 
208  Summary:
209  Returns the rect for the current frame rectangle.
210 
211  Description:
212  Returns the rect for the current frame rectangle. This function does not test
213  the pointer for validity
214 
215  Parameters:
216  leRect* rct - pointer to an leRect object
217 
218  Returns:
219  void
220 */
221 void leRenderer_GetFrameRect(leRect* rct);
222 
223 // *****************************************************************************
224 /* Function:
225  lePixelBuffer* leGetRenderBuffer();
226 
227  Summary:
228  Gets a pointer to the current render buffer. Use with caution.
229 
230  Description:
231  Gets a pointer to the current render buffer. Use with caution.
232 
233  Parameters:
234 
235  Returns:
236  lePixelBuffer* - the current render buffer
237 */
238 lePixelBuffer* leGetRenderBuffer(void);
239 
240 // *****************************************************************************
241 /* Function:
242  leColorMode leRenderer_CurrentColorMode();
243 
244  Summary:
245  Gets the color mode of the current rendering layer.
246 
247  Description:
248  Gets the color mode of the current rendering layer.
249 
250  Parameters:
251 
252  Returns:
253  leColorMode - the current render color mode
254 */
255 leColorMode leRenderer_CurrentColorMode(void);
256 
257 // *****************************************************************************
258 /* Function:
259  lePalette* leRenderer_GetGlobalPalette()
260 
261  Summary:
262  Gets a pointer to the active global palette.
263 
264  Description:
265  Gets a pointer to the active global palette.
266 
267  Parameters:
268 
269  Returns:
270  lePalette* - the current global palette
271 */
272 lePalette* leRenderer_GetGlobalPalette(void);
273 
274 // *****************************************************************************
275 /* Function:
276  leResult leRenderer_SetGlobalPalette(lePalette* pal)
277 
278  Summary:
279  Sets the global palette to the given pointer.
280 
281  Description:
282  Sets the global palette to the given pointer.
283 
284  Parameters:
285  lePalette* pal - the palette to set
286 
287  Returns:
288  leResult
289 */
290 leResult leRenderer_SetGlobalPalette(lePalette* pal);
291 
292 // *****************************************************************************
293 /* Function:
294  leColor leRenderer_GlobalPaletteLookup(uint32_t idx)
295 
296  Summary:
297  Queries the global palette for a lookup value.
298 
299  Description:
300  Queries the global palette for a lookup value.
301 
302  Parameters:
303  uint32_t idx - index to query
304 
305  Returns:
306  leColor - the result color
307 */
308 leColor leRenderer_GlobalPaletteLookup(uint32_t idx);
309 
310 // *****************************************************************************
311 /* Function:
312  leColor leRenderer_ConvertColor(leColor inColor, leColorMode inMode)
313 
314  Summary:
315  Converts a color from the input mode to the current layer render color.
316 
317  Description:
318  Converts a color from the input mode to the current layer render color.
319 
320  Parameters:
321  leColor inColor - the input color
322  leColorMode inMode - the color mode of the input
323 
324  Returns:
325  leColor - the result color
326 */
327 leColor leRenderer_ConvertColor(leColor inColor, leColorMode inMode);
328 
329 // *****************************************************************************
330 /* Function:
331  void leRenderer_GetDrawRect(leRect* rect)
332 
333  Summary:
334  Gets the current draw rectangle.
335 
336  Description:
337  Gets the current draw rectangle.
338 
339  Parameters:
340 
341  Returns:
342  void
343 */
344 //void leRenderer_GetDrawRect(leRect* rect);
345 
346 // *****************************************************************************
347 /* Function:
348  leBool leRenderer_CullDrawRect(const leRect* rect)
349 
350  Summary:
351  Attempts to cull a rectangle against the current draw rectangle.
352 
353  Description:
354  Attempts to cull a rectangle against the current draw rectangle.
355 
356  Parameters:
357  const leRect* rect - rectangle to cull (screen space)
358 
359  Returns:
360  leBool - LE_TRUE if the rectangle is outside of the draw rectangle
361 */
362 leBool leRenderer_CullDrawRect(const leRect* rect);
363 
364 // *****************************************************************************
365 /* Function:
366  leRenderer_CullDrawXY(int32_t x, int32_t y)
367 
368  Summary:
369  Attempts to cull a point against the current draw rectangle.
370 
371  Description:
372  Attempts to cull a point against the current draw rectangle.
373 
374  Parameters:
375  int32_t x - the x component of the point to cull (screen space)
376  int32_t y - the y component of the point to cull (screen space)
377 
378  Returns:
379  leBool - LE_TRUE if the point is outside of the draw rectangle
380 */
381 leBool leRenderer_CullDrawXY(int32_t x, int32_t y);
382 
383 // *****************************************************************************
384 /* Function:
385  leBool leRenderer_CullDrawPoint(const lePoint* pt)
386 
387  Summary:
388  Attempts to cull a point against the current draw rectangle.
389 
390  Description:
391  Attempts to cull a point against the current draw rectangle.
392 
393  Parameters:
394  const lePoint* pt - the point to cull (screen space)
395 
396  Returns:
397  leBool - LE_TRUE if the point is outside of the draw rectangle
398 */
399 leBool leRenderer_CullDrawPoint(const lePoint* pt);
400 
401 // *****************************************************************************
402 /* Function:
403  void leRenderer_ClipDrawRect(const leRect* rect, leRect* res)
404 
405  Summary:
406  Clips a rectangle against the current draw rectangle.
407 
408  Description:
409  Clips a rectangle against the current draw rectangle.
410 
411  Parameters:
412  const leRect* rect - rectangle to clip (screen space)
413  leRect* res - the clip result (screen space)
414 
415  Returns:
416  void
417 */
418 void leRenderer_ClipDrawRect(const leRect* rect, leRect* res);
419 
420 // *****************************************************************************
421 /* Function:
422  leColor leRenderer_GetPixel(int32_t x, int32_t y)
423 
424  Summary:
425  Reads a pixel from the current render buffer. Does not do bounds checking.
426 
427  Description:
428  Reads a pixel from the current render buffer. Does not do bounds checking.
429 
430  Parameters:
431  int32_t x - the x component of the point to cull (screen space)
432  int32_t y - the y component of the point to cull (screen space)
433 
434  Returns:
435  leColor - the color that was read
436 */
437 leColor leRenderer_GetPixel(int32_t x,
438  int32_t y);
439 
440 // *****************************************************************************
441 /* Function:
442  leResult leRenderer_GetPixel_Safe(int32_t x,
443  int32_t y,
444  leColor* clr)
445 
446  Summary:
447  Safely reads a pixel from the current render buffer.
448 
449  Description:
450  Safely reads a pixel from the current render buffer.
451 
452  Parameters:
453  int32_t x - the x component of the point to read (screen space)
454  int32_t y - the y component of the point to read (screen space)
455  leColor* clr - the color that was read
456 
457  Returns:
458  leResult - LE_TRUE if the point could be read
459 */
460 leResult leRenderer_GetPixel_Safe(int32_t x,
461  int32_t y,
462  leColor* clr);
463 
464 // *****************************************************************************
465 /* Function:
466  leResult leRenderer_PutPixel(int32_t x,
467  int32_t y,
468  leColor clr)
469 
470  Summary:
471  Writes a pixel to the current render buffer. Does not do bounds checking.
472 
473  Description:
474  Writes a pixel to the current render buffer. Does not do bounds checking.
475 
476  Parameters:
477  int32_t x - the x component of the point to write (screen space)
478  int32_t y - the y component of the point to write (screen space)
479  leColor clr - the color to write
480 
481  Returns:
482  leResult
483 */
484 leResult leRenderer_PutPixel(int32_t x,
485  int32_t y,
486  leColor clr);
487 
488 // *****************************************************************************
489 /* Function:
490  leResult leRenderer_BlendPixel(int32_t x,
491  int32_t y,
492  leColor clr,
493  uint32_t a)
494 
495  Summary:
496  Writes a pixel to the current render buffer. Does not do bounds checking.
497 
498  Description:
499  Writes a pixel to the current render buffer. Does not do bounds checking.
500 
501  Parameters:
502  int32_t x - the x component of the point to write (screen space)
503  int32_t y - the y component of the point to write (screen space)
504  leColor clr - the color to write
505  uint32_t a - the global alpha blending value to use
506 
507  Returns:
508  leResult
509 */
510 leResult leRenderer_BlendPixel(int32_t x,
511  int32_t y,
512  leColor clr,
513  uint32_t a);
514 
515 // *****************************************************************************
516 /* Function:
517  leResult leRenderer_PutPixel_Safe(int32_t x,
518  int32_t y,
519  leColor clr)
520 
521  Summary:
522  Safely writes a pixel to the current render buffer.
523 
524  Description:
525  Safely writes a pixel to the current render buffer.
526 
527  Parameters:
528  int32_t x - the x component of the point to write (screen space)
529  int32_t y - the y component of the point to write (screen space)
530  leColor clr - the color to write
531 
532  Returns:
533  leResult
534 */
535 leResult leRenderer_PutPixel_Safe(int32_t x,
536  int32_t y,
537  leColor clr);
538 
539 // *****************************************************************************
540 /* Function:
541  leResult leRenderer_BlendPixel_Safe(int32_t x,
542  int32_t y,
543  leColor clr,
544  uint32_t a)
545 
546  Summary:
547  Safely writes a pixel to the current render buffer.
548 
549  Description:
550  Safely writes a pixel to the current render buffer.
551 
552  Parameters:
553  int32_t x - the x component of the point to write (screen space)
554  int32_t y - the y component of the point to write (screen space)
555  leColor clr - the color to write
556  uint32_t a - the global alpha blending value to use
557 
558  Returns:
559  leResult
560 */
561 leResult leRenderer_BlendPixel_Safe(int32_t x,
562  int32_t y,
563  leColor clr,
564  uint32_t a);
565 
566 // *****************************************************************************
567 /* Function:
568  leResult leRenderer_FillArea(int32_t x,
569  int32_t y,
570  uint32_t width,
571  uint32_t height,
572  leColor clr,
573  uint32_t a)
574 
575  Summary:
576  Fills an area of the buffer with a single color. Does not do bounds
577  checking.
578 
579  Description:
580  Fills an area of the buffer with a single color. Does not do bounds
581  checking.
582 
583  Parameters:
584  int32_t x - the x component of the area to fill (screen space)
585  int32_t y - the y component of the area to fill (screen space)
586  uint32_t width - the width of the area
587  uint32_t height - the height of the area
588  leColor clr - the color to write
589  uint32_t a - the global alpha blending value to use
590 
591  Returns:
592  leResult
593 */
594 leResult leRenderer_FillArea(int32_t x,
595  int32_t y,
596  uint32_t width,
597  uint32_t height,
598  leColor clr,
599  uint32_t a);
600 
601 // *****************************************************************************
602 /* Function:
603  leResult leRenderer_HorzLine(int32_t x,
604  int32_t y,
605  int32_t w,
606  leColor clr,
607  uint32_t a)
608 
609  Summary:
610  Draws a horizontal line.
611 
612  Description:
613  Draws a horizontal line.
614 
615  Parameters:
616  int32_t x - the x component of the line (screen space)
617  int32_t y - the y component of the line (screen space)
618  uint32_t w - the width of the line
619  leColor clr - the color to write
620  uint32_t a - the global alpha blending value to use
621 
622  Returns:
623  leResult
624 */
625 leResult leRenderer_HorzLine(int32_t x,
626  int32_t y,
627  int32_t w,
628  leColor clr,
629  uint32_t a);
630 
631 // *****************************************************************************
632 /* Function:
633  leResult leRenderer_VertLine(int32_t x,
634  int32_t y,
635  int32_t h,
636  leColor clr,
637  uint32_t a)
638 
639  Summary:
640  Draws a vertical line.
641 
642  Description:
643  Draws a vertical line.
644 
645  Parameters:
646  int32_t x - the x component of the line (screen space)
647  int32_t y - the y component of the line (screen space)
648  uint32_t h - the height of the line
649  leColor clr - the color to write
650  uint32_t a - the global alpha blending value to use
651 
652  Returns:
653  leResult
654 */
655 leResult leRenderer_VertLine(int32_t x,
656  int32_t y,
657  int32_t h,
658  leColor clr,
659  uint32_t a);
660 
661 // *****************************************************************************
662 /* Function:
663  leResult leRenderer_DrawLine(int32_t x0,
664  int32_t y0,
665  int32_t x1,
666  int32_t y1,
667  leColor clr,
668  uint32_t a)
669 
670  Summary:
671  Draws a line.
672 
673  Description:
674  Draws a line.
675 
676  Parameters:
677  int32_t x0 - the start x component of the line (screen space)
678  int32_t y0 - the start y component of the line (screen space)
679  int32_t x1 - the end x component of the line (screen space)
680  int32_t y1 - the end y component of the line (screen space)
681  leColor clr - the color to write
682  uint32_t a - the global alpha blending value to use
683 
684  Returns:
685  leResult
686 */
687 leResult leRenderer_DrawLine(int32_t x0,
688  int32_t y0,
689  int32_t x1,
690  int32_t y1,
691  leColor clr,
692  uint32_t a);
693 
694 // *****************************************************************************
695 /* Function:
696  leResult leRenderer_RectLine(const leRect* rect,
697  leColor clr,
698  uint32_t a)
699 
700  Summary:
701  Draws an outline rectangle.
702 
703  Description:
704  Draws an outline rectangle.
705 
706  Parameters:
707  const leRect* rect - the rectangle to draw (screen space)
708  leColor clr - the color to write
709  uint32_t a - the global alpha blending value to use
710 
711  Returns:
712  leResult
713 */
714 leResult leRenderer_RectLine(const leRect* rect,
715  leColor clr,
716  uint32_t a);
717 
718 // *****************************************************************************
719 /* Function:
720  leResult leRenderer_RectFill(const leRect* rect,
721  leColor clr,
722  uint32_t a)
723 
724  Summary:
725  Draws a filled rectangle.
726 
727  Description:
728  Draws a filled rectangle.
729 
730  Parameters:
731  const leRect* rect - the rectangle to draw (screen space)
732  leColor clr - the color to write
733  uint32_t a - the global alpha blending value to use
734 
735  Returns:
736  leResult
737 */
738 leResult leRenderer_RectFill(const leRect* rect,
739  leColor clr,
740  uint32_t a);
741 
742 // *****************************************************************************
743 /* Function:
744  leResult leRenderer_HorzGradientRect(const leRect* rect,
745  leColor clr1,
746  leColor clr2,
747  uint32_t a)
748 
749  Summary:
750  Draws a horizontal gradient filled rectangle.
751 
752  Description:
753  Draws a horizontal gradient filled rectangle.
754 
755  Parameters:
756  const leRect* rect - the rectangle to draw (screen space)
757  leColor clr1 - the start color
758  leColor clr2 - the end color
759  uint32_t a - the global alpha blending value to use
760 
761  Returns:
762  leResult
763 */
764 leResult leRenderer_HorzGradientRect(const leRect* rect,
765  leColor clr1,
766  leColor clr2,
767  uint32_t a);
768 
769 // *****************************************************************************
770 /* Function:
771  leResult leRenderer_VertGradientRect(const leRect* rect,
772  leColor clr1,
773  leColor clr2,
774  uint32_t a)
775 
776  Summary:
777  Draws a vertical gradient filled rectangle.
778 
779  Description:
780  Draws a vertical gradient filled rectangle.
781 
782  Parameters:
783  const leRect* rect - the rectangle to draw (screen space)
784  leColor clr1 - the start color
785  leColor clr2 - the end color
786  uint32_t a - the global alpha blending value to use
787 
788  Returns:
789  leResult
790 */
791 leResult leRenderer_VertGradientRect(const leRect* rect,
792  leColor clr1,
793  leColor clr2,
794  uint32_t a);
795 
796 // *****************************************************************************
797 /* Function:
798  leResult leRenderer_CircleDraw(const leRect* rect,
799  int32_t x,
800  int32_t y,
801  uint32_t radius,
802  uint32_t thickness,
803  leColor clr,
804  uint32_t alpha)
805 
806  Summary:
807  Draws a circle outline.
808 
809  Description:
810  Draws a circle outline.
811 
812  Parameters:
813  const leRect* rect - the bounds of the circle area (screen space)
814  int32_t x - the x component of the origin (bound space)
815  int32_t y - the y component of the origin (bound space)
816  uint32_t radius - the radius of the circle
817  uint32_t thickness - the thickness of the circle
818  leColor clr - the color to write
819  uint32_t a - the global alpha blending value to use
820 
821  Returns:
822  leResult
823 */
824 leResult leRenderer_CircleDraw(const leRect* rect,
825  uint32_t thickness,
826  leColor clr,
827  uint32_t alpha);
828 
829 // *****************************************************************************
830 /* Function:
831  leResult leRenderer_CircleDraw(const leRect* rect,
832  int32_t x,
833  int32_t y,
834  uint32_t radius,
835  uint32_t thickness,
836  leColor clr,
837  uint32_t alpha)
838 
839  Summary:
840  Draws a filled circle.
841 
842  Description:
843  Draws a filled circle.
844 
845  Parameters:
846  const leRect* rect - the bounds of the circle area (screen space)
847  int32_t x - the x component of the origin (bound space)
848  int32_t y - the y component of the origin (bound space)
849  uint32_t radius - the radius of the circle
850  uint32_t thickness - the thickness of the circle
851  leColor borderClr - the outline color to write
852  leColor fillClr - the fill color to write
853  uint32_t a - the global alpha blending value to use
854 
855  Returns:
856  leResult
857 */
858 leResult leRenderer_CircleFill(const leRect* rect,
859  uint32_t thickness,
860  leColor borderClr,
861  leColor fillClr,
862  uint32_t alpha);
863 
864 // *****************************************************************************
865 /* Function:
866  leResult leRenderer_ArcLine(int32_t x,
867  int32_t y,
868  int32_t r,
869  int32_t startAngle,
870  int32_t centerAngle,
871  leColor clr,
872  uint32_t a)
873 
874  Summary:
875  Draws an arc line.
876 
877  Description:
878  Draws an arc line.
879 
880  Parameters:
881  int32_t x - the x component of the origin (screen space)
882  int32_t y - the y component of the origin (screen space)
883  uint32_t radius - the radius of the arc
884  uint32_t startAngle - the arc starting angle
885  uint32_t centerAngle - the arc center angle
886  leColor clr - the color to write
887  uint32_t a - the global alpha blending value to use
888 
889  Returns:
890  leResult
891 */
892 leResult leRenderer_ArcLine(int32_t x,
893  int32_t y,
894  int32_t radius,
895  int32_t startAngle,
896  int32_t centerAngle,
897  leColor clr,
898  uint32_t a);
899 
900 // *****************************************************************************
901 /* Function:
902  leResult leRenderer_ArcFill(const leRect* drawRect,
903  int32_t startAngle,
904  int32_t centerAngle,
905  uint32_t thickness,
906  leBool rounded,
907  leColor clr,
908  leBool antialias,
909  uint32_t a)
910 
911  Summary:
912  Draws a filled arc.
913 
914  Description:
915  Draws a filled arc.
916 
917  Parameters:
918  const leRect* drawRect - the bounds of the arc (screen space)
919  int32_t x - the x component of the origin (bound space)
920  int32_t y - the y component of the origin (bound space)
921  uint32_t radius - the radius of the arc
922  uint32_t startAngle - the arc starting angle
923  uint32_t spanAngle - the arc span/center angle
924  leBool rounded - indicates that the arc should draw rounded ends
925  leColor clr - the color to write
926  leBool antialias - indicates that an antialiased arc should be drawn (not supported yet)
927  uint32_t a - the global alpha blending value to use
928 
929  Returns:
930  leResult
931 */
932 leResult leRenderer_ArcFill(const leRect* drawRect,
933  int32_t startAngle,
934  int32_t spanAngle,
935  uint32_t thickness,
936  leBool rounded,
937  leColor clr,
938  leBool antialias,
939  uint32_t a);
940 
941 // *****************************************************************************
942 /* Function:
943  leResult leRenderer_EllipseLine(int32_t x,
944  int32_t y,
945  int32_t a,
946  int32_t b,
947  int32_t theta,
948  int32_t startAngle,
949  int32_t endAngle,
950  leColor clr,
951  uint32_t alpha)
952 
953  Summary:
954  Draws an ellipse.
955 
956  Description:
957  Draws an ellipse.
958 
959  Parameters:
960  int32_t x - the x component of the ellipse origin (screen space)
961  int32_t y - the y component of the ellipse origin (screen space)
962  int32_t a - the major axis component of the ellipse
963  int32_t b - the minor axis component of the ellipse
964  int32_t theta - the rotation component of the ellipse
965  int32_t startAngle - the starting angle
966  int32_t centerAngle - the center angle
967  leColor clr - the color to write
968  uint32_t alpha - the global alpha blending value to use
969 
970  Returns:
971  leResult
972 */
973 leResult leRenderer_EllipseLine(int32_t x,
974  int32_t y,
975  int32_t a,
976  int32_t b,
977  int32_t theta,
978  int32_t startAngle,
979  int32_t endAngle,
980  leColor clr,
981  uint32_t alpha);
982 
989 /* internal use only */
994 leResult _leRenderer_CreateLayerState(struct leLayerState* st);
995 
996 void _leRenderer_DestroyLayerState(struct leLayerState* st);
997 
1003 #ifdef __cplusplus
1004 }
1005 #endif
1006 
1007 #endif // LEGATO_RENDERER_H
Common macros and definitions used by Legato.
Palette functions and definitions.
This struct represents a palette asset.
Definition: legato_palette.h:69
An array implementation for storing rectangles for the Legato user interface library.
leResult
This enum represents function call results.
Definition: legato_common.h:123
This struct represents a rectangle.
Definition: legato_common.h:394
Pixel Buffer functions and definitions.
Definition: legato_state.h:68
This structure is used represents the size of an item.
Definition: legato_common.h:370
This struct represents the graphics processor interface.
Definition: gfx_driver.h.ftl:1227
This structure represents a integer Cartesian point.
Definition: legato_common.h:346
Definition: legato_pixelbuffer.h:90
Legato widget definitions.
leColorMode
This enum represents the supported RGB color formats.
Definition: legato_color.h:148
leBool
This enum represents booleans.
Definition: legato_common.h:146
This struct represents the display driver interface.
Definition: gfx_driver.h.ftl:1206
Rectangle functions and definitions.
Definition: legato_renderer.h:49