本文整理汇总了C++中MyString::GetLength方法的典型用法代码示例。如果您正苦于以下问题:C++ MyString::GetLength方法的具体用法?C++ MyString::GetLength怎么用?C++ MyString::GetLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyString
的用法示例。
在下文中一共展示了MyString::GetLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UseMyString
void UseMyString(MyString Input)
{
cout << "String buffer in MyString is " << Input.GetLength();
cout << " characters long" << endl;
cout << "Buffer contains: " << Input.GetString() << endl;
return;
}
示例2: x_async_refresh
void x_async_refresh(CGContextRef myContext,CGRect myBoundingBox)
{
#ifdef ENABLEQD
CEmulatorMac* pEmu = (CEmulatorMac*)CEmulator::theEmulator;
if (!pEmu) return ;
#endif
#ifndef DRIVER_IOS
x_vbl_count++;
#endif
addFrameRate(0);
CHANGE_BORDER(1,0xFF);
// OG
if (macUsingCoreGraphics)
{
if(r_sim65816.is_emulator_offscreen_available() && g_kimage_offscreen.dev_handle)
{
/*
void addConsoleWindow(Kimage* _dst);
addConsoleWindow(&g_kimage_offscreen);
*/
CGContextSaveGState(myContext);
#ifndef DRIVER_IOS
// CGContextTranslateCTM(myContext,0.0, X_A2_WINDOW_HEIGHT);
CGContextTranslateCTM(myContext,0.0, myBoundingBox.size.height);
CGContextScaleCTM(myContext,1.0,-1.0);
#endif
CGImageRef myImage = CGBitmapContextCreateImage((CGContextRef)g_kimage_offscreen.dev_handle);
CGContextDrawImage(myContext, myBoundingBox, myImage);// 6
#ifndef VIDEO_SINGLEVLINE
if (r_sim65816.get_video_fx() == VIDEOFX_CRT)
{
CGContextSetRGBFillColor(myContext,0,0,0,0.5);
for(int h=0;h<g_kimage_offscreen.height;h+=2)
{
CGRect r = CGRectMake(0,h,g_kimage_offscreen.width_act,1);
CGContextFillRect(myContext,r);
}
}
#endif
CGImageRelease(myImage);
CGContextRestoreGState(myContext);
#ifndef DRIVER_IOS
if (!messageLine.IsEmpty())
{
CGContextSaveGState(myContext);
CGContextSetTextMatrix(myContext,CGAffineTransformIdentity);
CGContextTranslateCTM(myContext,0.0, X_A2_WINDOW_HEIGHT);
CGContextScaleCTM(myContext,1.0,-1.0);
CGContextSelectFont(myContext, "Courier", 14.0, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(myContext, kCGTextFill);
CGContextSetRGBFillColor (myContext, 1,1, 1, 1);
CGContextSetShouldAntialias(myContext, true);
#define SHADOW 4.0
CGFloat myColorValues[] = {0.5, 0.5, 0.5, 1.0};
CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB ();// 9
CGColorRef myColor = CGColorCreate (myColorSpace, myColorValues);
CGContextSetShadowWithColor(myContext, CGSizeMake(SHADOW, -SHADOW), 4,
myColor
//CGColorCreateGenericGray(0.5,1.0)
);
CGContextShowTextAtPoint(myContext, 20.0, X_A2_WINDOW_HEIGHT-20.0, messageLine.c_str(), messageLine.GetLength());
CGContextRestoreGState(myContext);
messageLineVBL--;
if (messageLineVBL<0)
messageLine.Empty();
else
x_refresh_video();
}
#endif
}
else
//.........这里部分代码省略.........