本文整理汇总了C++中uiimport_t::R_DrawStretchPic方法的典型用法代码示例。如果您正苦于以下问题:C++ uiimport_t::R_DrawStretchPic方法的具体用法?C++ uiimport_t::R_DrawStretchPic怎么用?C++ uiimport_t::R_DrawStretchPic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uiimport_t
的用法示例。
在下文中一共展示了uiimport_t::R_DrawStretchPic方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UI_DrawHandlePic
/*
================
UI_DrawHandlePic
=================
*/
void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader )
{
float s0;
float s1;
float t0;
float t1;
if( w < 0 ) { // flip about horizontal
w = -w;
s0 = 1;
s1 = 0;
}
else {
s0 = 0;
s1 = 1;
}
if( h < 0 ) { // flip about vertical
h = -h;
t0 = 1;
t1 = 0;
}
else {
t0 = 0;
t1 = 1;
}
ui.R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
}
示例2: UI_DrawNamedPic
/*
================
UI_DrawNamedPic
=================
*/
void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname )
{
qhandle_t hShader;
hShader = ui.R_RegisterShaderNoMip( picname );
ui.R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
}
示例3: UI_FillRect
/*
================
UI_FillRect
Coordinates are 640*480 virtual values
=================
*/
void UI_FillRect( float x, float y, float width, float height, const float *color )
{
ui.R_SetColor( color );
ui.R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, uis.whiteShader );
ui.R_SetColor( NULL );
}