Graphics framework for GR-PEACH. When you use this program, we judge you have agreed to the following contents. https://developer.mbed.org/teams/Renesas/wiki/About-LICENSE
Dependents: ImageZoomInout_Sample ImageRotaion_Sample ImageScroll_Sample GR-PEACH_LCD_4_3inch_Save_to_USB ... more
RGA_API.h
00001 /******************************************************************************* 00002 * DISCLAIMER 00003 * This software is supplied by Renesas Electronics Corporation and is only 00004 * intended for use with Renesas products. No other uses are authorized. This 00005 * software is owned by Renesas Electronics Corporation and is protected under 00006 * all applicable laws, including copyright laws. 00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING 00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT 00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. 00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS 00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE 00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR 00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE 00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00016 * Renesas reserves the right, without notice, to make changes to this software 00017 * and to discontinue the availability of this software. By using this software, 00018 * you agree to the additional terms and conditions found by accessing the 00019 * following link: 00020 * http://www.renesas.com/disclaimer 00021 * Copyright (C) 2013 - 2014 Renesas Electronics Corporation. All rights reserved. 00022 *******************************************************************************/ 00023 /** 00024 * @file RGA_API.h 00025 * @brief $Module: RGA $ $PublicVersion: 1.20 $ (=RGA_VERSION) 00026 * $Rev: $ 00027 * $Date:: $ 00028 */ 00029 00030 #ifndef RGA_API_H 00031 #define RGA_API_H 00032 00033 /****************************************************************************** 00034 Includes <System Includes> , "Project Includes" 00035 ******************************************************************************/ 00036 #include "RGA_API_typedef.h " 00037 #include "frame_buffer_typedef.h " 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00043 00044 00045 /****************************************************************************** 00046 Typedef definitions 00047 ******************************************************************************/ 00048 00049 /****************************************************************************** 00050 Macro definitions 00051 ******************************************************************************/ 00052 00053 /****************************************************************************** 00054 Variable Externs 00055 ******************************************************************************/ 00056 00057 /****************************************************************************** 00058 Functions Prototypes 00059 ******************************************************************************/ 00060 00061 00062 /*********************************************************************** 00063 * Functions: R_RGA 00064 ************************************************************************/ 00065 bool_t R_RGA_IsSupportedPixelFormatForRGAH( pixel_format_t pixel_format ); 00066 00067 00068 /*********************************************************************** 00069 * Class: graphics_image_t 00070 ************************************************************************/ 00071 errnum_t R_GRAPHICS_IMAGE_InitR8G8B8A8( 00072 graphics_image_t *self, void *ImageDataArray, size_t ImageDataArraySize, 00073 int_fast32_t width, int_fast32_t height ); 00074 errnum_t R_GRAPHICS_IMAGE_InitSameSizeR8G8B8A8( 00075 graphics_image_t *self, void *ImageDataArray, size_t ImageDataArraySize, 00076 graphics_image_t *SameSizeImage ); 00077 errnum_t R_GRAPHICS_IMAGE_InitCopyFrameBufferR8G8B8A8( 00078 graphics_image_t *self, void *ImageDataArray, size_t ImageDataArraySize, 00079 graphics_t *Context, int_fast32_t MinX, int_fast32_t MinY, int_fast32_t width, int_fast32_t height ); 00080 errnum_t R_GRAPHICS_IMAGE_InitByShareFrameBuffer( graphics_image_t *self, frame_buffer_t *frame_buffer ); 00081 errnum_t R_GRAPHICS_IMAGE_GetProperties( const graphics_image_t *self, graphics_image_properties_t *out_Properties ); 00082 errnum_t R_GRAPHICS_IMAGE_GetImageFormat( const graphics_image_t *self, pixel_format_t *out_Format ); 00083 00084 00085 /*********************************************************************** 00086 * Class: graphics_pattern_t 00087 ************************************************************************/ 00088 errnum_t R_GRAPHICS_PATTERN_Initialize( graphics_pattern_t *self, 00089 const graphics_image_t *image, repetition_t repetition, graphics_t *Context ); 00090 00091 00092 /*********************************************************************** 00093 * Class: graphics_t 00094 ************************************************************************/ 00095 void R_GRAPHICS_InitConst( graphics_t *self ); 00096 errnum_t R_GRAPHICS_Initialize( graphics_t *self, graphics_config_t *Config ); 00097 errnum_t R_GRAPHICS_Finalize( graphics_t *self, errnum_t e ); 00098 00099 errnum_t R_GRAPHICS_SetFrameBuffer( graphics_t *self, frame_buffer_t *frame_buffer ); 00100 errnum_t R_GRAPHICS_GetFrameBuffer( graphics_t *self, frame_buffer_t **out_frame_buffer ); 00101 errnum_t R_GRAPHICS_Finish( graphics_t *self ); 00102 errnum_t R_GRAPHICS_FinishStart( graphics_t *self, r_ospl_async_t *Async ); 00103 errnum_t R_GRAPHICS_GetAsyncStatus( graphics_t *self, const graphics_async_status_t **out_Status ); 00104 errnum_t R_GRAPHICS_OnInterrupting(void); 00105 00106 errnum_t R_GRAPHICS_Save( graphics_t *self, graphics_status_t *out_Status ); 00107 errnum_t R_GRAPHICS_Restore( graphics_t *self, graphics_status_t *Status, errnum_t e ); 00108 00109 errnum_t R_GRAPHICS_ResetMatrix( graphics_t *self ); 00110 errnum_t R_GRAPHICS_SetMatrix_2x3( graphics_t *self, graphics_matrix_float_t sx, graphics_matrix_float_t ky, 00111 graphics_matrix_float_t kx, graphics_matrix_float_t sy, graphics_matrix_float_t tx, graphics_matrix_float_t ty ); 00112 errnum_t R_GRAPHICS_SetMatrix_3x3( graphics_t *self, graphics_matrix_float_t *Matrix ); 00113 errnum_t R_GRAPHICS_GetMatrix_3x3( graphics_t *self, graphics_matrix_float_t *out_Matrix ); 00114 errnum_t R_GRAPHICS_TranslateMatrixI( graphics_t *self, int_fast32_t tx, int_fast32_t ty ); 00115 errnum_t R_GRAPHICS_TranslateMatrix( graphics_t *self, graphics_matrix_float_t tx, graphics_matrix_float_t ty ); 00116 errnum_t R_GRAPHICS_ScaleMatrix( graphics_t *self, graphics_matrix_float_t sx, graphics_matrix_float_t sy ); 00117 errnum_t R_GRAPHICS_RotateMatrixDegree( graphics_t *self, graphics_matrix_float_t degree ); 00118 errnum_t R_GRAPHICS_ShearMatrix( graphics_t *self, graphics_matrix_float_t shx, graphics_matrix_float_t shy ); 00119 errnum_t R_GRAPHICS_TransformMatrix( graphics_t *self, graphics_matrix_float_t sx, graphics_matrix_float_t ky, 00120 graphics_matrix_float_t kx, graphics_matrix_float_t sy, graphics_matrix_float_t tx, graphics_matrix_float_t ty ); 00121 errnum_t R_GRAPHICS_MultiplyMatrix( graphics_t *self, graphics_matrix_float_t *Matrix ); 00122 errnum_t R_GRAPHICS_GetProjectiveMatrix( 00123 graphics_matrix_float_t SourceTopLeftX, graphics_matrix_float_t SourceTopLeftY, 00124 graphics_matrix_float_t SourceTopRightX, graphics_matrix_float_t SourceTopRightY, 00125 graphics_matrix_float_t SourceBottomLeftX, graphics_matrix_float_t SourceBottomLeftY, 00126 graphics_matrix_float_t SourceBottomRightX, graphics_matrix_float_t SourceBottomRightY, 00127 graphics_matrix_float_t DestinationTopLeftX, graphics_matrix_float_t DestinationTopLeftY, 00128 graphics_matrix_float_t DestinationTopRightX, graphics_matrix_float_t DestinationTopRightY, 00129 graphics_matrix_float_t DestinationBottomLeftX, graphics_matrix_float_t DestinationBottomLeftY, 00130 graphics_matrix_float_t DestinationBottomRightX, graphics_matrix_float_t DestinationBottomRightY, 00131 graphics_matrix_float_t *out_Matrix ); 00132 00133 errnum_t R_GRAPHICS_SetBackgroundColor( graphics_t *self, r8g8b8a8_t Color ); 00134 errnum_t R_GRAPHICS_GetBackgroundColor( graphics_t *self, r8g8b8a8_t *out_Color ); 00135 errnum_t R_GRAPHICS_GetClearColor( graphics_t *self, r8g8b8a8_t *out_Color ); 00136 errnum_t R_GRAPHICS_Clear( graphics_t *self, 00137 int_fast32_t MinX, int_fast32_t MinY, int_fast32_t width, int_fast32_t height ); 00138 00139 errnum_t R_GRAPHICS_DrawImage( graphics_t *self, const graphics_image_t *image, 00140 int_fast32_t MinX, int_fast32_t MinY ); 00141 errnum_t R_GRAPHICS_DrawImageResized( graphics_t *self, const graphics_image_t *image, 00142 int_fast32_t MinX, int_fast32_t MinY, int_fast32_t width, int_fast32_t height ); 00143 errnum_t R_GRAPHICS_DrawImageChild( graphics_t *self, const graphics_image_t *image, 00144 int_fast32_t SourceMinX, int_fast32_t SourceMinY, 00145 int_fast32_t SourceWidth, int_fast32_t SourceHeight, 00146 int_fast32_t DestinationMinX, int_fast32_t DestinationMinY, 00147 int_fast32_t DestinationWidth, int_fast32_t DestinationHeight ); 00148 00149 errnum_t R_GRAPHICS_FillRect( graphics_t *self, int_fast32_t MinX, int_fast32_t MinY, 00150 int_fast32_t width, int_fast32_t height ); 00151 errnum_t R_GRAPHICS_SetFillColor( graphics_t *self, r8g8b8a8_t Color ); 00152 errnum_t R_GRAPHICS_SetFillPattern( graphics_t *self, graphics_pattern_t *Pattern ); 00153 00154 errnum_t R_GRAPHICS_StrokeRect( graphics_t *self, int_fast32_t MinX, int_fast32_t MinY, 00155 int_fast32_t width, int_fast32_t height ); 00156 errnum_t R_GRAPHICS_SetStrokeColor( graphics_t *self, r8g8b8a8_t Color ); 00157 00158 errnum_t R_GRAPHICS_BeginPath( graphics_t *self ); 00159 errnum_t R_GRAPHICS_Rect( graphics_t *self, int_t MinX, int_t MinY, 00160 int_t width, int_t height ); 00161 errnum_t R_GRAPHICS_Cilp( graphics_t *self ); 00162 00163 errnum_t R_GRAPHICS_SetGlobalAlpha( graphics_t *self, uint8_t AlphaValue ); 00164 errnum_t R_GRAPHICS_GetGlobalAlpha( graphics_t *self, uint8_t *out_AlphaValue ); 00165 errnum_t R_GRAPHICS_SetGlobalCompositeOperation( graphics_t *self, 00166 graphics_composite_operation_t CompositeOperation ); 00167 errnum_t R_GRAPHICS_GetGlobalCompositeOperation( graphics_t *self, 00168 graphics_composite_operation_t *out_CompositeOperation ); 00169 00170 errnum_t R_GRAPHICS_SetQualityFlags( graphics_t *self, 00171 graphics_quality_flags_t Qualities ); 00172 errnum_t R_GRAPHICS_GetQualityFlags( graphics_t *self, 00173 graphics_quality_flags_t *out_Qualities ); 00174 00175 00176 /*********************************************************************** 00177 * Class: graphics_static_t 00178 ************************************************************************/ 00179 graphics_static_t *get_graphics_static(void); 00180 errnum_t R_GRAPHICS_STATIC_GetVersion( uint32_t *out_Version ); 00181 errnum_t R_GRAPHICS_STATIC_OnInitializeDefault( graphics_t *self, graphics_config_t *in_out_Config, 00182 void **out_CalleeDefined ); 00183 errnum_t R_GRAPHICS_STATIC_OnFinalizeDefault( graphics_t *self, void *CalleeDefined, errnum_t e ); 00184 errnum_t R_GRAPHICS_STATIC_SetOnInitialize( 00185 R_GRAPHICS_OnInitialize_FuncType CallbackFunction ); 00186 errnum_t R_GRAPHICS_STATIC_SetOnFinalize( 00187 R_GRAPHICS_OnFinalize_FuncType CallbackFunction ); 00188 00189 00190 /*********************************************************************** 00191 * Class: RGA_SHS 00192 * Synchronize hardware and software rendering 00193 ************************************************************************/ 00194 errnum_t R_GRAPHICS_BeginSoftwareRendering( graphics_t *self ); 00195 errnum_t R_GRAPHICS_BeginSoftwareRendering2( graphics_t *self ); 00196 errnum_t R_GRAPHICS_BeginSoftwareRenderingA( graphics_t *self, void *Address ); 00197 errnum_t R_GRAPHICS_EndSoftwareRendering( graphics_t *self ); 00198 errnum_t R_GRAPHICS_EndRenderingInFin( graphics_t *self, errnum_t e ); 00199 00200 00201 /*********************************************************************** 00202 * Class: animation_timing_function_t 00203 ************************************************************************/ 00204 errnum_t R_Get_AnimationTimingFunction( char_t *TimingName, 00205 animation_timing_function_t **out_Timing ); 00206 00207 float32_t R_ANIMATION_TIMING_FUNCTION_GetValue( animation_timing_function_t *self, 00208 float32_t ClampTime, float32_t ValueOfPreviousKeyFrame, float32_t ValueOfNextKeyFrame ); 00209 00210 00211 /*********************************************************************** 00212 * Functions: Self_Test_for_Package 00213 ************************************************************************/ 00214 errnum_t R_RGA_CheckStructSize( size_t SizeOf_GraphicsClass, size_t SizeOf_GraphicsStatusClass, 00215 size_t Zero ); 00216 00217 00218 #ifdef __cplusplus 00219 } /* extern "C" */ 00220 #endif 00221 00222 #endif /* RGA_API_H */
Generated on Tue Jul 12 2022 11:15:04 by 1.7.2