1 /****************************************************************************
2 *
3 *    Copyright 2012 - 2020 Vivante Corporation, Santa Clara, California.
4 *    All Rights Reserved.
5 *
6 *    Permission is hereby granted, free of charge, to any person obtaining
7 *    a copy of this software and associated documentation files (the
8 *    'Software'), to deal in the Software without restriction, including
9 *    without limitation the rights to use, copy, modify, merge, publish,
10 *    distribute, sub license, and/or sell copies of the Software, and to
11 *    permit persons to whom the Software is furnished to do so, subject
12 *    to the following conditions:
13 *
14 *    The above copyright notice and this permission notice (including the
15 *    next paragraph) shall be included in all copies or substantial
16 *    portions of the Software.
17 *
18 *    THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19 *    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 *    IN NO EVENT SHALL VIVANTE AND/OR ITS SUPPLIERS BE LIABLE FOR ANY
22 *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 *****************************************************************************/
27 
28 #ifndef ELM_H_
29 #define ELM_H_
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #define     ELM_VERSION         0x00010000      /* Current Version: 1.0. */
36 #define     ELM_NULL_HANDLE     0   /*! NULL object handle, represent a void object. */
37 
38     /*!
39      @typedef ELM_EVO_PROP_BIT
40      evo property bits to control evo manipulation.
41      */
42     typedef enum {
43         ELM_PROP_ROTATE_BIT    = 1 << 0,     /*! rotate bit of evo/ego/ebo transformation property. */
44         ELM_PROP_TRANSFER_BIT  = 1 << 1,     /*! transfer bit of evo/ego/ebo transformation property. */
45         ELM_PROP_SCALE_BIT     = 1 << 2,     /*! scale bit of evo/ego/ebo transformation property. */
46         ELM_PROP_BLEND_BIT     = 1 << 3,     /*! blending bit of evo/ebo rendering property. */
47         ELM_PROP_QUALITY_BIT   = 1 << 4,     /*! quality bit of evo/ebo rendering property. */
48         ELM_PROP_FILL_BIT      = 1 << 5,     /*! fill rule bit of evo rendering property. */
49         ELM_PROP_COLOR_BIT     = 1 << 6,     /*! fill color bit of evo rendering property. */
50         ELM_PROP_PAINT_BIT     = 1 << 7,     /*! paint type bit of evo. */
51         ELM_PROP_ALL_BIT       = 0xFFFFFFFF, /*! all transformation property bits of evo. */
52     } ELM_EVO_PROP_BIT;
53 
54     /*!
55      @typedef ELM_EVO_BLEND
56      The blending property of the evo object when it's drawn.
57      D is Destination color, S is Source color;
58      Da is Destination alpha, S is Source alpha.
59      */
60     typedef enum {
61         ELM_BLEND_NONE = 0,    /*! D = S. */
62         ELM_BLEND_SRC_OVER,    /*! D = S + (1 - Sa) * D */
63         ELM_BLEND_DST_OVER,    /*! D = (1 - Da) * S + D */
64         ELM_BLEND_SRC_IN,      /*! D = Da * S */
65         ELM_BLEND_DST_IN,      /*! D = Sa * D */
66         ELM_BLEND_SCR,         /*! D = S + D - S * D */
67         ELM_BLEND_MUL,         /*! D = S * (1 - Da) + D * (1 - Sa) + S * D */
68         ELM_BLEND_ADD,         /*! S + D */
69         ELM_BLEND_SUB          /*! D * (1 - S) */
70     } ELM_BLEND;
71 
72     /*!
73      @typedef ELM_EVO_QUALITY
74      The drawing quality of the evo object.
75      */
76     typedef enum {
77         ELM_QUALITY_LOW    = 0,       /*! NOAA for evo, POINT SAMPLE for ebo. */
78         ELM_QUALITY_MED = 1,       /*! 2XAA for evo, LINEAR SAMPLE for ebo. */
79         ELM_QULIATY_HI  = 2,       /*! 4XAA for evo, BI-LINEAR SAMPLE for ebo. */
80     } ELM_QUALITY;
81 
82     /*!
83      @typedef ELM_PAINT_TYPE
84      Those are types for evo fill paint.
85      COLOR means solid color fill;
86      PATTERN means fill with an image (evo);
87      GRADIENT means fill with linear gradient.
88      */
89     typedef enum {
90         ELM_PAINT_COLOR    = 0,     /*! Paint evo with solid color */
91         ELM_PAINT_PATTERN  = 1,     /*! Paint evo with ebo */
92         ELM_PAINT_GRADIENT = 2,     /*! Paint evo with a linear gradient built-in evo object */
93         ELM_PAINT_RADIAL_GRADIENT = 3, /*! Paint evo with a radial gradient built-in evo object */
94         ELM_PAINT_TEXT     = 4,     /*! Paint evo-text */
95     } ELM_PAINT_TYPE;
96 
97     /*!
98      @typedef ELM_PATTERN_MODE
99      Those are enum types for pattern fill mode.
100      COLOR means fill the area outside the pattern with a solid color;
101      PAD means extend the border color to the area outside the pattern.
102      */
103     typedef enum {
104         ELM_PATTERN_MODE_COLOR  = 0,
105         ELM_PATTERN_MODE_PAD    = 1,
106     } ELM_PATTERN_MODE;
107 
108     /*!
109      @typedef ELM_EVO_FILL
110      The filling rule of for an evo object.
111      EO = EVEN_ODD;
112      NZ = NONE_ZERO;
113      */
114     typedef enum {
115         ELM_EVO_FILL_NZ     = 0, /*! none-zero fill rule */
116         ELM_EVO_FILL_EO        = 1, /*! Even-odd fill rule */
117     } ELM_EVO_FILL;
118 
119     /*!
120      @typedef ELM_EVO_TYPE
121      the type of an evo object. could be pathes, images, or a group which contains other EVOs.
122      */
123     typedef enum {
124         ELM_OBJECT_TYPE_EVO = 0,    /*! elementary vector object, representing a path object. */
125         ELM_OBJECT_TYPE_EGO = 1,    /*! elementary group object, containing multiple path objects. */
126         ELM_OBJECT_TYPE_EBO = 2,    /*! elementary bitmap object, representing image data. */
127         ELM_OBJECT_TYPE_BUF = 3,    /*! rendering buffer object, created by application. */
128         ELM_OBJECT_TYPE_FONT = 4,    /*! elementary font object, representing character data. */
129         ELM_OBJECT_TYPE_TEXT = 5,    /*! elementary text object, representing text data. */
130     } ELM_OBJECT_TYPE;
131 
132     /*!
133      @typedef ELM_BUFFER_FORMAT
134      Enumeration for buffer format, all format name definiton is sequenced from LSB to MSB.
135      */
136     typedef enum {
137         ELM_BUFFER_FORMAT_RGBA8888,   /*! 32-bit RGBA format with 8 bits per color channel. Red is in bits 7:0, green in bits 15:8, blue in
138                                             bits 23:16, and the alpha channel is in bits 31:24. */
139         ELM_BUFFER_FORMAT_BGRA8888,   /*! 32-bit RGBA format with 8 bits per color channel. Red is in bits 23:16, green in bits 15:8, blue in
140                                             bits 7:0, and the alpha channel is in bits 31:24. */
141         ELM_BUFFER_FORMAT_RGBX8888,   /*! 32-bit RGBX format with 8 bits per color channel. Red is in bits 7:0, green in bits 15:8, blue in
142                                             bits 23:16, and the x channel is in bits 31:24. */
143         ELM_BUFFER_FORMAT_BGRX8888,   /*! 32-bit RGBX format with 8 bits per color channel. Red is in bits 23:16, green in bits 15:8, blue in
144                                             bits 7:0, and the x channel is in bits 31:24. */
145         ELM_BUFFER_FORMAT_RGB565,     /*! 16-bit RGB format with 5 and 6 bits per color channel. Red is in bits 4:0, green in bits 10:5, and
146                                             the blue color channel is in bits 15:11. */
147         ELM_BUFFER_FORMAT_BGR565,     /*! 16-bit RGB format with 5 and 6 bits per color channel. Red is in bits 15:11, green in bits 10:5,
148                                             and the blue color channel is in bits 4:0. */
149         ELM_BUFFER_FORMAT_RGBA4444,   /*! 16-bit RGBA format with 4 bits per color channel. Red is in bits 3:0, green in bits 7:4, blue in
150                                             bits 11:8 and the alpha channel is in bits 15:12. */
151         ELM_BUFFER_FORMAT_BGRA4444,   /*! 16-bit RGBA format with 4 bits per color channel. Red is in bits 11:8, green in bits 7:4, blue in
152                                             bits 3:0 and the alpha channel is in bits 15:12. */
153         ELM_BUFFER_FORMAT_BGRA5551,   /*! 16-bit RGBA format with 4 bits per color channel. Red is in bits 14:10, green in bits 9:5, blue in
154                                             bits 4:0 and the alpha channel is in bit 15:15. */
155         ELM_BUFFER_FORMAT_INDEX_1,    /*! 1-bit indexed format. */
156         ELM_BUFFER_FORMAT_INDEX_2,    /*! 2-bits indexed format. */
157         ELM_BUFFER_FORMAT_INDEX_4,    /*! 4-bits indexed format. */
158         ELM_BUFFER_FORMAT_INDEX_8,    /*! 8-bits indexed format. */
159     } ELM_BUFFER_FORMAT;
160 
161     /*!
162      @typedef ElmHandle
163      common handle type for object reference.
164      */
165     typedef unsigned int ElmHandle;
166 
167     /*!
168      @typedef ElmVecObj
169      evo object handle (elemtry vector object). Created from an external binary evo file.
170     */
171     typedef ElmHandle ElmVecObj;
172 
173     /*!
174      @typedef ElmBitmapObj
175      ebo object handle (elementry image object). Created from an external ebo file.
176      */
177     typedef ElmHandle ElmBitmapObj;
178 
179     /*!
180      @typedef ElmGroupObj
181      group object handle. Create from an external ego file.
182      */
183     typedef ElmHandle ElmGroupObj;
184 
185     /*!
186      @typedef ElmBuffer
187      render buffer object handle.
188      */
189     typedef ElmHandle ElmBuffer;
190 
191     #define TRUE  1
192     #define FALSE 0
193     /*!
194      @typedef BOOL
195      boolean type define.
196      */
197     typedef unsigned int  BOOL;
198 
199     /*!
200      @abstract Initialize Elementary context.
201 
202      @discussion
203      It should be called as the first function of Elemenatary libary, which initializes the library. Currently
204      Elementary library doesn't support context concept, neigher multi-threading. Elementary library defines
205      origin of coordinate system is at top-left.
206 
207      @param none
208 
209      @return none
210      */
211     BOOL ElmInitialize(uint32_t width, uint32_t height);
212 
213     /*!
214      @abstract Terminate Elementary context.
215 
216      @discussion
217      This should be called when an app exits. It frees all the resource.
218 
219      @param none
220 
221      @return none
222      */
223     void ElmTerminate(void);
224 
225     /*!
226      @abstract Create an elementary object from an existing binary file.
227 
228      @discussion
229      This function creates an elementary object from the file whose file name is specified by param name.
230      Caller must match type with the binary file, otherwise create mail fail by returning ELM_NULL_HANDLE.
231 
232      @param type
233      Specify what type of object to be created.
234 
235      @param name
236      The name of the binary resource file.
237 
238      @return ElmHandle
239      An object handle depending on the corresponding type. If type mismatches, it
240      returns ELM_NULL_HANDLE.
241      */
242     ElmHandle ElmCreateObjectFromFile(ELM_OBJECT_TYPE type, const char *name);
243 
244     /*!
245      @abstract Create an elementary object from build-in data within the appplication.
246 
247      @discussion
248      This function creates an elementar object from local data pointer, which is specially useful for environment without filesystem support.
249 
250      @param type
251      Specify what type of object to be created.
252 
253      @param data
254      The pointer to the binary data which has exactly same layout as external resource file.
255 
256      @return ElmHandle
257      An object handle depending on the corresponding type. If type mismatches with the binary data, it
258      returns ELM_NULL_HANDLE.
259      */
260     ElmHandle ElmCreateObjectFromData(ELM_OBJECT_TYPE type, void *data, int size);
261 
262     /*!
263      @abstract Rotate a graphics object with centain degree
264 
265      @discussion
266      This function sets an evo/ebo/ego object rotated with specified angle. Without reset, these setting will be
267      accumulated.
268 
269      @param obj
270      The graphics object will be rotated.
271 
272      @param angle
273      A radian value to be applied on the evo object.
274 
275      @return bool
276      Rotate is set successfully.
277      */
278     BOOL ElmRotate(ElmHandle obj, float angle);
279 
280     /*!
281      @abstract Transfer an graphics object at different directions.
282 
283      @discussion
284      This function put an evo/ebo/ego object away at different directions. Without reset, the setting will be
285      accumulated.
286 
287      @param obj
288      The graphics object will be transfered.
289 
290      @param x
291      The units in pixel of X direction.
292 
293      @param y
294      The units in pixel of Y direction.
295 
296      @return bool
297      Transfer is set successfully.
298      */
299     BOOL ElmTransfer(ElmHandle obj, int x, int y);
300 
301     /*!
302      @abstract Scale an graphics object at different directions.
303 
304      @discussion
305      This function scale up or down an evo/ego/ebo object at different directions. Without reset, the setting will
306      be accumateled.
307 
308      @param obj
309      The graphics object which is targeted to manipulate.
310 
311      @param x
312      The scale ratio in X direction.
313 
314      @param y
315      The scale ratio in Y direction.
316 
317      @return bool
318      Scale is set succefully.
319      */
320     BOOL ElmScale(ElmHandle obj, float x, float y);
321 
322     /*!
323      @abstract Reset the attribute of a graphics object for specified property bit.
324 
325      @discussion
326      This funcion resets specified property for an elementary object. It can be applied all types of objects.
327      But some properties are only valid for centain types of objects. If the function is called to reset an invalid
328      property for this type of object, it will be siliently ignored.
329      After reset, the specifed property of an evo/ebo/ego object is set to the initial state. The initial states are decided
330      by the binary resource file. The resource creator should set right value for all properties if they want to directly render
331      the object without any adjustment in application. There is one issue, at present, application has no way to query current value
332      of each property, is it required?
333 
334      @param obj
335      The graphics object which is targeted to manipulate.
336 
337      @param mask
338      Specify which property or properties need to reset to initial value.
339 
340      @return bool
341      Reset is done successfully. If some mask is not valid for this type of object, it would return false.
342      */
343     BOOL ElmReset(ElmHandle obj, ELM_EVO_PROP_BIT mask);
344 
345     /*!
346      @abstract Draw a graphics object onto current render target
347 
348      @discussion
349      This is an enssentail function to do the real job, it takes all current setting of the elementary object and
350      render into theb buffer target.
351 
352      @param buffer
353      The render target that an elmentary object will be rendered into.
354 
355      @param obj
356      The elmentary object will be draw into render target.
357 
358      @return bool
359      The draw operation for this elmentary object is sucessful.
360      */
361     BOOL ElmDraw(ElmBuffer buffer, ElmHandle object);
362 
363     /*!
364      @abstract Set the rendering quality of an graphics object.
365 
366      @discussion
367      This function sets the rendering quality of an evo/ebo object. Avaliable quality setting contains:
368      ELM_EVO_QUALITY_LOW, ELM_EVO_QUALITY_MED, ELM_EVO_QUALITY_HI. This function is only applied to an evo or an ebo.
369      Group object can't be set quality. It always use the setting from its binary.
370 
371      @param obj
372      The elementary object.
373 
374      @param quality
375      The quality enum.
376 
377      @return bool
378      The operation for this object is sucessful, for group object and invalid enum, would return false.
379      */
380     BOOL ElmSetQuality(ElmHandle obj, ELM_QUALITY quality);
381 
382     /*!
383      @abstract Set the fill rule of an evo object.
384 
385      @discussion
386      This function sets the fill rule of an elementary object. Avaliable quality setting contains:
387      ELM_EVO_EO, ELM_EVO_NZ. It only applies to evo object.
388 
389      @param evo
390      The evo object.
391 
392      @param fill
393      The fill rule enum.
394 
395      @return bool
396      The operation for this evo is sucessful. For non-evo object an ENUM is not a valid enum, would return false.
397      */
398     BOOL ElmSetFill(ElmVecObj evo, ELM_EVO_FILL fill);
399 
400     /*!
401      @abstract Set the blending mode of an evo/ebo object.
402 
403      @discussion
404      This function sets the blending mode of an evo/ebo object. It's not applied to group object.
405 
406      @param obj
407      The graphics object.
408 
409      @param blend
410      The blending mode enum.
411 
412      @return bool
413      The operation for this evo/ebo is sucessful. If object is a group object or blend mode is not a legal one, it would return false.
414      */
415     BOOL ElmSetBlend(ElmHandle obj, ELM_BLEND blend);
416 
417     /*!
418      @abstract Set the solid fill color of an evo object.
419 
420      @discussion
421      This function sets the solid fill color of an evo object.
422 
423      @param evo
424      The evo object.
425 
426      @param color
427      The uint32 color value in rgba order.
428 
429      @return bool
430      The operation for this evo is sucessful. If the object is not a evo object, it would return false.
431      */
432     BOOL ElmSetColor(ElmVecObj evo, uint32_t color);
433 
434     /*!
435      @abstract Set the image paint fill of an evo.
436 
437      @discussion
438      This function sets the image pattern for filling an evo. The image pattern
439      is a loaded ebo. The ebo's transformation is applied when drawing the evo.
440 
441      @param evo
442      The evo object.
443 
444      @param pattern
445      The image pattern to be set for the evo.
446 
447      @return bool
448      The operation is successful or not.
449      */
450     BOOL ElmSetPattern(ElmVecObj evo, ElmBitmapObj pattern);
451 
452     /*!
453      @abstract Set the image paint fill of an evo.
454 
455      @discussion
456      This function sets the image pattern for filling an evo. The image pattern
457      is a loaded ebo. The ebo's transformation is applied when drawing the evo.
458 
459      @param evo
460      The evo object.
461 
462      @param pattern
463      The image pattern to be set for the evo.
464 
465      @return bool
466      The operation is successful or not.
467      */
468     BOOL ElmSetPatternMode(ElmVecObj evo, ELM_PATTERN_MODE mode, uint32_t color);
469 
470     /*!
471      @abstract Set the paint type of an evo.
472 
473      @discussion
474      This function selects the paint type for evo to use. An evo may have 3 types
475      of paint: COLOR, PATTERN, and LINEAR GRADIENT. The Linear graident is always
476      a built-in resource, which can not be altered. If a binary resource doesn't
477      have built-in gradient paint resource, it can't be selected as the paint source.
478      Solid color is also a built-in attribute, but it can be changed by ElmSetColor().
479      Paint with a pattern always need an external ebo object, which is impossible
480      to be embedded in resource file,i.e. ebo object. Before select paint type to
481      be PATTERN, ElmSetPattern() must be called to attach an EBO to an EVO.
482 
483      @param evo
484      The evo object.
485 
486      @param type
487      The paint type to be set for the evo.
488 
489      @return bool
490      The operation is successful or not.
491      If the corresponding type is not avaiable for the evo, it returns false and
492      type  paint type falls back to COLOR.
493      */
494     BOOL ElmSetPaintType(ElmVecObj evo, ELM_PAINT_TYPE type);
495 
496     /*!
497      @abstract Create internal render buffer.
498 
499      @discussion
500      This functiois is to create an internal render buffer for Elementary rendering, ussually it's not for direct display.
501      The buffer which is displayed on pannel is wrapped up by another API, whose address is managed by display controller side.
502 
503      @param width
504      The buffer's width.
505 
506      @param height
507      The buffer's height.
508 
509      @param format
510      The buffer's format, check enumeration of ELM_BUFFER_FORMAT.
511 
512      @return
513      The buffer handle.
514      */
515     ElmBuffer ElmCreateBuffer(unsigned int width, unsigned int height, ELM_BUFFER_FORMAT format);
516 
517     /*!
518     @abstract Wrap a customized buffer.
519 
520     @discussion
521     The application may wrap a user created buffer by giving the information of
522     the buffer including the size, the memory addresses and format. E.g., the
523     application can wrap a system framebuffer thus ELM can directly render onto
524      the screen.
525 
526     @return
527     The buffer handle.
528     */
529     ElmBuffer ElmWrapBuffer(int width, int height, int stride,
530                             void *logical, uint32_t physical,
531                             ELM_BUFFER_FORMAT format);
532 
533     /*!
534     @abstract Get buffer address.
535 
536     @discussion
537     The function is to get the address of ElmBuffer.
538 
539     @return
540     The buffer address.
541     */
542 
543     uint32_t ElmGetBufferAddress(ElmBuffer buffer);
544 
545     /*!
546      @abstract Destroy a render buffer.
547 
548      @discussion
549      This function is to release all internal resource inside Elementary libary belonging to this buffer.
550      Applicatoin need make sure the buffer is not being used by elmentary library any more when calling this function.
551 
552      @param buffer
553      The render buffer handle
554 
555      @return
556      If destroying is completed successfully.
557      */
558     BOOL ElmDestroyBuffer(ElmBuffer buffer);
559 
560     /*!
561      @abstract Save a buffer to PNG file.
562 
563      @discussion
564      This function can save the buffer into a PNG file.
565 
566      @param buffer
567      The render buffer handle.
568 
569      @param name
570      The name of the PNG file to sve.
571 
572      @return
573      Save OK or NOT.
574 
575      */
576     BOOL ElmSaveBuffer(ElmBuffer buffer, const char *name);
577 
578     /*!
579      @abstract Clear a render buffer with specified color and dimension.
580 
581      @discussion
582      This function is called to clear full or partial of the buffer. If the rectangle is out of buffer space, the intersect portion will be cleared.
583 
584      @param buffer
585      A render buffer handle.
586 
587      @param color
588      Clear color value.
589 
590      @param x
591      x origin of partical clear rectangle.
592 
593      @param y
594      y origin of partial clear rectangle.
595 
596      @param width
597      width of partical clear rectangle.
598 
599      @param height
600      height of partical clear rectangle.
601 
602      @param full
603      Flag to indicate a full buffer clear. If true, the dimension parameters will be ignored.
604 
605      @return bool
606      Indicate the clear operation is set up correctly.
607     */
608     BOOL ElmClear(ElmBuffer buffer, uint32_t color, uint32_t x, uint32_t y, uint32_t width, uint32_t height, BOOL full);
609 
610     /*!
611      @abstract Destroy an ELM object.
612 
613      @discussion
614      This function is to release all internal resource inside Elementary libary belonging to this object.
615      Applicatoin need make sure the object is not being used by elmentary library any more when calling this function.
616      If an EBO is being destroyed and it's attached to one EVO, it need to guarantee that EVO is not being used by elementary library too.
617 
618      @param object
619      The object handle
620 
621      @return
622      If destroying is completed successfully.
623      */
624     BOOL ElmDestroyObject(ElmHandle object);
625 
626      /*!
627      @abstract Finish all rendering on GPU issued before this call.
628 
629      @discussion
630      This function tells the engine that it has finished the frame data and GPU can draw it now. It's blocked until GPU rendering done.
631 
632      @return
633      If the opeartion is successfully done or not.
634      */
635     BOOL ElmFinish();
636 
637     /*!
638      @abstract Flush all rendering command to GPU issued before this call.
639 
640      @discussion
641      This function tells the engine to start kicking off command to GPU side, it will return immediately after firing off GPU.
642 
643      @return
644      If the opeartion is successfully done or not.
645      */
646     BOOL ElmFlush();
647 
648     /*!
649      @abstract Query the paint color of an evo object.
650      */
651     BOOL ElmGetColor(ElmVecObj evoHandle,uint32_t *color);
652 
653     /*!
654      @abstract Query the vectory path count of an EGO object. If the given object
655      is an evo/ebo, the count is 0.
656      */
657     uint32_t ElmGetVectorCount(ElmHandle handle);
658 
659     /*!
660      @abstract Query the type of an object (by handle).
661      */
662     ELM_OBJECT_TYPE ElmGetObjectType(ElmHandle handle);
663 
664     /*!
665      @abstract Set the current vectory object index to operate on.
666      */
667     BOOL ElmSetCurrentVector(int32_t id);
668 
669     BOOL ElmScalePaint(ElmHandle handle, float sx, float sy);
670     BOOL ElmRotatePaint(ElmHandle handle, float degrees);
671     BOOL ElmTranslatePaint(ElmHandle handle, float tx, float ty);
672 
673     /*!
674      @abstract Get handle of the framebuffer.
675      */
676     ElmBuffer ElmGetBuffer(vg_lite_buffer_t *buffer);
677 
678 #ifdef __cplusplus
679 }
680 #endif
681 #endif /* ELM_H_ */
682