openvg/openvgrefimplementation/sfopenvg/openvgu/vgu.cpp
changeset 43 7579f232bae7
equal deleted inserted replaced
36:01a6848ebfd7 43:7579f232bae7
       
     1 /*
       
     2 * Copyright (c) 2009 Symbian Foundation Ltd
       
     3 * This component and the accompanying materials are made available
       
     4 * under the terms of the License "Eclipse Public License v1.0"
       
     5 * which accompanies this distribution, and is available
       
     6 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 *
       
     8 * Initial Contributors:
       
     9 * Symbian Foundation Ltd - initial contribution.
       
    10 * 
       
    11 * Contributors:
       
    12 *
       
    13 * Description:
       
    14 * Implementation of VGU interface
       
    15 */
       
    16 
       
    17 #include <e32base.h>
       
    18 #include <vgu.h>
       
    19 
       
    20 #include "vguinternal.h" //contains do_vguXX fucntion declarations
       
    21 
       
    22 extern "C" {
       
    23 
       
    24 EXPORT_C VGUErrorCode vguLine(VGPath path, VGfloat x0, VGfloat y0, VGfloat x1, VGfloat y1)
       
    25 {
       
    26 return do_vguLine(path, x0, y0, x1, y1);
       
    27 }
       
    28 
       
    29 /*-------------------------------------------------------------------*//*!
       
    30 * \brief	
       
    31 * \param	
       
    32 * \return	
       
    33 * \note		
       
    34 *//*-------------------------------------------------------------------*/
       
    35 
       
    36 EXPORT_C VGUErrorCode vguPolygon(VGPath path, const VGfloat * points, VGint count, VGboolean closed)
       
    37 {
       
    38 return do_vguPolygon(path, points, count, closed);
       
    39 }
       
    40 
       
    41 /*-------------------------------------------------------------------*//*!
       
    42 * \brief	
       
    43 * \param	
       
    44 * \return	
       
    45 * \note		
       
    46 *//*-------------------------------------------------------------------*/
       
    47 
       
    48 EXPORT_C VGUErrorCode vguRect(VGPath path, VGfloat x, VGfloat y, VGfloat width, VGfloat height)
       
    49 {
       
    50 return do_vguRect(path, x, y, width, height);
       
    51 }
       
    52 
       
    53 /*-------------------------------------------------------------------*//*!
       
    54 * \brief	
       
    55 * \param	
       
    56 * \return	
       
    57 * \note		
       
    58 *//*-------------------------------------------------------------------*/
       
    59 
       
    60 EXPORT_C VGUErrorCode vguRoundRect(VGPath path, VGfloat x, VGfloat y, VGfloat width, VGfloat height, VGfloat arcWidth, VGfloat arcHeight)
       
    61 {
       
    62 return do_vguRoundRect(path, x, y, width, height, arcWidth, arcHeight);
       
    63 }
       
    64 
       
    65 /*-------------------------------------------------------------------*//*!
       
    66 * \brief	
       
    67 * \param	
       
    68 * \return	
       
    69 * \note		
       
    70 *//*-------------------------------------------------------------------*/
       
    71 
       
    72 EXPORT_C VGUErrorCode vguEllipse(VGPath path, VGfloat cx, VGfloat cy, VGfloat width, VGfloat height)
       
    73 {
       
    74 return do_vguEllipse(path, cx, cy, width, height);
       
    75 }
       
    76 
       
    77 /*-------------------------------------------------------------------*//*!
       
    78 * \brief	
       
    79 * \param	
       
    80 * \return	
       
    81 * \note		
       
    82 *//*-------------------------------------------------------------------*/
       
    83 
       
    84 EXPORT_C VGUErrorCode vguArc(VGPath path, VGfloat x, VGfloat y, VGfloat width, VGfloat height, VGfloat startAngle, VGfloat angleExtent, VGUArcType arcType)
       
    85 {
       
    86 return do_vguArc(path, x, y, width, height, startAngle, angleExtent, arcType);
       
    87 }
       
    88 
       
    89 /*-------------------------------------------------------------------*//*!
       
    90 * \brief	
       
    91 * \param	
       
    92 * \return	
       
    93 * \note		
       
    94 *//*-------------------------------------------------------------------*/
       
    95 
       
    96 EXPORT_C VGUErrorCode vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, VGfloat sx1, VGfloat sy1, VGfloat sx2, VGfloat sy2, VGfloat sx3, VGfloat sy3, VGfloat * matrix)
       
    97 {
       
    98 return do_vguComputeWarpQuadToSquare(sx0, sy0, sx1, sy1, sx2, sy2, sx3, sy3, matrix);
       
    99 }
       
   100 
       
   101 /*-------------------------------------------------------------------*//*!
       
   102 * \brief	
       
   103 * \param	
       
   104 * \return	
       
   105 * \note		
       
   106 *//*-------------------------------------------------------------------*/
       
   107 
       
   108 EXPORT_C VGUErrorCode vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, VGfloat dx1, VGfloat dy1, VGfloat dx2, VGfloat dy2, VGfloat dx3, VGfloat dy3, VGfloat * matrix)
       
   109 {
       
   110 return do_vguComputeWarpSquareToQuad(dx0, dy0, dx1, dy1, dx2, dy2, dx3, dy3, matrix);
       
   111 }
       
   112 
       
   113 /*-------------------------------------------------------------------*//*!
       
   114 * \brief	
       
   115 * \param	
       
   116 * \return	
       
   117 * \note		
       
   118 *//*-------------------------------------------------------------------*/
       
   119 
       
   120 EXPORT_C VGUErrorCode vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, VGfloat dx1, VGfloat dy1, VGfloat dx2, VGfloat dy2, VGfloat dx3, VGfloat dy3, VGfloat sx0, VGfloat sy0, VGfloat sx1, VGfloat sy1, VGfloat sx2, VGfloat sy2, VGfloat sx3, VGfloat sy3, VGfloat * matrix)
       
   121 {
       
   122 return do_vguComputeWarpQuadToQuad(dx0, dy0, dx1, dy1, dx2, dy2, dx3, dy3, sx0, sy0, sx1, sy1, sx2, sy2, sx3, sy3, matrix);
       
   123 }
       
   124 
       
   125 }