当前位置: 首页>>代码示例>>C++>>正文


C++ VG_RETURN函数代码示例

本文整理汇总了C++中VG_RETURN函数的典型用法代码示例。如果您正苦于以下问题:C++ VG_RETURN函数的具体用法?C++ VG_RETURN怎么用?C++ VG_RETURN使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了VG_RETURN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: vgLoadMatrix

VG_API_CALL void vgLoadMatrix(const VGfloat * mm)
{
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    VG_RETURN_ERR_IF(!mm, VG_ILLEGAL_ARGUMENT_ERROR, VG_NO_RETVAL);
    /* TODO: check matrix array alignment */

    m = shCurrentMatrix(context);

    if (context->matrixMode == VG_MATRIX_IMAGE_USER_TO_SURFACE) {

        SETMAT((*m),
               mm[0], mm[3], mm[6],
               mm[1], mm[4], mm[7],
               mm[2], mm[5], mm[8]);
    } else {

        SETMAT((*m),
               mm[0], mm[3], mm[6],
               mm[1], mm[4], mm[7],
               0.0f,  0.0f,  1.0f);
    }

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:26,代码来源:shContext.c

示例2: vgResizeSurfaceSH

VG_API_CALL void vgResizeSurfaceSH(VGint width, VGint height)
{
  VG_GETCONTEXT(VG_NO_RETVAL);
  
  /* update surface info */
  context->surfaceWidth = width;
  context->surfaceHeight = height;
  
  /* setup GL projection */
  
#ifdef ANDROIDVG
	glViewport(0,0,width,height);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrthof(0,(GLfloat) width,0,(GLfloat) height, -1, 1);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
#else
	glViewport(0,0,width,height);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(0,width,0,height);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
#endif
  
  VG_RETURN(VG_NO_RETVAL);
}
开发者ID:gdawg,项目名称:androidvg,代码行数:28,代码来源:shContext.c

示例3: vgGetVectorSize

VG_API_CALL VGint vgGetVectorSize(VGParamType type)
{
  int retval = 0;
  VG_GETCONTEXT(retval);
  
  switch(type)
  {
  case VG_MATRIX_MODE:
  case VG_FILL_RULE:
  case VG_IMAGE_QUALITY:
  case VG_RENDERING_QUALITY:
  case VG_BLEND_MODE:
  case VG_IMAGE_MODE:
  case VG_STROKE_CAP_STYLE:
  case VG_STROKE_JOIN_STYLE:
  case VG_PIXEL_LAYOUT:
  case VG_FILTER_CHANNEL_MASK:
  case VG_FILTER_FORMAT_LINEAR:
  case VG_FILTER_FORMAT_PREMULTIPLIED:
  case VG_STROKE_DASH_PHASE_RESET:
  case VG_MASKING:
  case VG_SCISSORING:
  case VG_STROKE_LINE_WIDTH:
  case VG_STROKE_MITER_LIMIT:
  case VG_STROKE_DASH_PHASE:
  case VG_MAX_SCISSOR_RECTS:
  case VG_MAX_DASH_COUNT:
  case VG_MAX_KERNEL_SIZE:
  case VG_MAX_SEPARABLE_KERNEL_SIZE:
  case VG_MAX_COLOR_RAMP_STOPS:
  case VG_MAX_IMAGE_WIDTH:
  case VG_MAX_IMAGE_HEIGHT:
  case VG_MAX_IMAGE_PIXELS:
  case VG_MAX_IMAGE_BYTES:
  case VG_MAX_FLOAT:
  case VG_MAX_GAUSSIAN_STD_DEVIATION:
    retval = 1;
    break;
    
  case VG_TILE_FILL_COLOR:
  case VG_CLEAR_COLOR:
    retval = 4;
    break;
    
  case VG_STROKE_DASH_PATTERN:
    retval = context->strokeDashPattern.size;
    break;
    
  case VG_SCISSOR_RECTS:
    retval = context->scissor.size * 4;
    break;
    
  default:
    /* Invalid VGParamType */
    VG_RETURN_ERR(VG_ILLEGAL_ARGUMENT_ERROR, retval);
  }
  
  VG_RETURN(retval);
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:59,代码来源:shParams.c

示例4: vgGetString

VG_API_CALL const VGubyte * vgGetString(VGStringID name)
{
  VG_GETCONTEXT(NULL);
  
  switch(name) {
  case VG_VENDOR:
    VG_RETURN((const VGubyte*)context->vendor);
  case VG_RENDERER:
    VG_RETURN((const VGubyte*)context->renderer);
  case VG_VERSION:
    VG_RETURN((const VGubyte*)context->version);
  case VG_EXTENSIONS:
    VG_RETURN((const VGubyte*)context->extensions);
  default:
    VG_RETURN(NULL);
  }
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:17,代码来源:shParams.c

示例5: vgGetError

VG_API_CALL VGErrorCode vgGetError(void)
{
    VGErrorCode error;
    VG_GETCONTEXT(VG_NO_CONTEXT_ERROR);
    error = context->error;
    context->error = VG_NO_ERROR;
    VG_RETURN(error);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:8,代码来源:shContext.c

示例6: vgTranslate

VG_API_CALL void vgTranslate(VGfloat tx, VGfloat ty)
{
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    m = shCurrentMatrix(context);
    TRANSLATEMATR((*m), tx, ty);

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:10,代码来源:shContext.c

示例7: vgShear

VG_API_CALL void vgShear(VGfloat shx, VGfloat shy)
{
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    m = shCurrentMatrix(context);
    SHEARMATR((*m), shx, shy);

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:10,代码来源:shContext.c

示例8: vgLoadIdentity

VG_API_CALL void vgLoadIdentity(void)
{
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    m = shCurrentMatrix(context);
    IDMAT((*m));

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:10,代码来源:shContext.c

示例9: vgGetiv

VG_API_CALL void vgGetiv(VGParamType type, VGint count, VGint * values)
{
  VG_GETCONTEXT(VG_NO_RETVAL);
  
  /* TODO: check output array alignment */
  
  /* Error code will be set by shGet */
  shGet(context, type, count, values, 0);
  VG_RETURN(VG_NO_RETVAL);
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:10,代码来源:shParams.c

示例10: vgScale

VG_API_CALL void vgScale(VGfloat sx, VGfloat sy)
{
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    m = shCurrentMatrix(context);
    SCALEMATR((*m), sx, sy);

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:10,代码来源:shContext.c

示例11: vgSetfv

VG_API_CALL void vgSetfv(VGParamType type, VGint count,
                         const VGfloat * values)
{
  VG_GETCONTEXT(VG_NO_RETVAL);
  
  /* TODO: check input array alignment */
  
  /* Error code will be set by shSet */
  shSet(context, type, count, values, 1);
  VG_RETURN(VG_NO_RETVAL);
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:11,代码来源:shParams.c

示例12: vgRotate

VG_API_CALL void vgRotate(VGfloat angle)
{
    SHfloat a;
    SHMatrix3x3 *m;
    VG_GETCONTEXT(VG_NO_RETVAL);

    a = SH_DEG2RAD(angle);
    m = shCurrentMatrix(context);
    ROTATEMATR((*m), a);

    VG_RETURN(VG_NO_RETVAL);
}
开发者ID:stumposs,项目名称:flightgear-2.8.0-teamboeing,代码行数:12,代码来源:shContext.c

示例13: vgSeti

VG_API_CALL void vgSeti (VGParamType type, VGint value)
{
  VG_GETCONTEXT(VG_NO_RETVAL);
  
  /* Check if target vector */
  VG_RETURN_ERR_IF(shIsParamVector(type),
                   VG_ILLEGAL_ARGUMENT_ERROR,
                   VG_NO_RETVAL);
  
  /* Error code will be set by shSet */
  shSet(context, type, 1, &value, 0);
  VG_RETURN(VG_NO_RETVAL);
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:13,代码来源:shParams.c

示例14: vgGeti

VG_API_CALL VGint vgGeti(VGParamType type)
{
  VGint retval = 0;
  VG_GETCONTEXT(retval);
  
  /* Check if target vector */
  VG_RETURN_ERR_IF(shIsParamVector(type),
                   VG_ILLEGAL_ARGUMENT_ERROR,
                   retval);
  
  /* Error code will be set by shGet */
  shGet(context, type, 1, &retval, 0);
  VG_RETURN(retval);
}
开发者ID:phoenix826,项目名称:shivavg,代码行数:14,代码来源:shParams.c

示例15: vgCreatePaint

VG_API_CALL VGPaint vgCreatePaint(void)
{
  SHPaint *p = NULL;
  VG_GETCONTEXT(VG_INVALID_HANDLE);
  
  /* Create new paint object */
  SH_NEWOBJ(SHPaint, p);
  VG_RETURN_ERR_IF(!p, VG_OUT_OF_MEMORY_ERROR,
                   VG_INVALID_HANDLE);
  
  /* Add to resource list */
  shPaintArrayPushBack(&context->paints, p);
  
  VG_RETURN((VGPaint)p);
}
开发者ID:Chazzz,项目名称:pyShiva,代码行数:15,代码来源:shPaint.c


注:本文中的VG_RETURN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。