亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? drawing_hellocontrol.cpp

?? Symbian OS C++ for Mobile Phones v3 Example Code
?? CPP
字號:
// Drawing_HelloControl.cpp
// ----------------------------
//
// Copyright (c) 2002 Symbian Software Ltd.  All rights reserved.
//

////////////////////////////////////////////////////////////////////////
//
// Source file for the implementation of the 
// application CExampleHelloControl class
//
////////////////////////////////////////////////////////////////////////

#include "Drawing.h"
#include <GulUtil.h>


CExampleHelloControl* CExampleHelloControl::NewL(const CCoeControl& aContainer, const TRect& aRect)
	{
	CExampleHelloControl* self=new(ELeave) CExampleHelloControl;
	CleanupStack::PushL(self);
	self->ConstructL(aContainer, aRect);
	CleanupStack::Pop();
	return self;
	}

void CExampleHelloControl::ConstructL(const CCoeControl& aContainer, const TRect& aRect)
	{
	SetContainerWindowL(aContainer);
	SetRect(aRect);
	iView=CExampleHelloView::NewL();
	iText=iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_HELLO_WORLD);
	iView->SetTextL(*iText);
	iZoomFactor.SetGraphicsDeviceMap(iCoeEnv->ScreenDevice());
	SetZoomAndDeviceDependentFontL(1000);
	ActivateL();
	}
	


TInt CExampleHelloControl::GetZoom() const
	{
	return iZoomFactor.ZoomFactor();
	}

//
//	Called on class construction and as a result of zooming in or out. 
//	As well as setting the zoom factor, the function allocates a device-dependent
//  font for the "Hello World" text.
//	This is an appropriate location for the font allocation as it is expected to
//	change when the user zooms in or out.
//	The font allocation could also be performed in Draw() or CExampleHelloControl::DrawL(), which
//	is called by Draw(). However, Draw() is not a leave function and it implements a
//  virtual function in the parent class and cannot be altered. Therefore, in order to
//  be able to allocate a font a trap harness would have to be used, resulting in a call
//  from Draw() something like the following, with the font allocation taking place in
//  DrawL(): TRAPD(err, iView -> DrawL(iZoomFactor, gc, rect));
//  Using a trap here is undesirable practice (although it would allow all the
//  device-independent code to be contained in the CExampleHelloView class).
//
void CExampleHelloControl::SetZoomAndDeviceDependentFontL(TInt aZoomFactor)
	{
	iZoomFactor.SetZoomFactor(aZoomFactor);

	//Allocate a device dependent font for drawing.
	iZoomFactor.ReleaseFont(iFont);
	iFont=NULL; // This is in case the function leaves with the LeaveIfError() below.
				// In this case iFont would still have the old value when the class
				// destructor is called, and in the destructor the zoom factor will
				// attempt to release the same font again, causing the application
				// to crash. 
    _LIT(fontName, "SwissA");
    TFontSpec fontSpec(fontName, 240); // font size is 12 point 
	fontSpec.iFontStyle=TFontStyle(EPostureUpright, EStrokeWeightBold, EPrintPosNormal);
	User::LeaveIfError(iZoomFactor.GetNearestFontInTwips(iFont, fontSpec));
	}

void CExampleHelloControl::SetZoomInL()
	{
	TInt zoom=GetZoom();
	zoom=
		zoom < 500 ?  500 :
		zoom < 1000 ? 1000 : 
		zoom < 1500 ? 1500 :
		zoom < 2000 ? 2000 :
		500;//if you keep zooming in the font and rectangle size becomes small again.
	SetZoomAndDeviceDependentFontL(zoom);
	}

void CExampleHelloControl::SetZoomOutL()
	{
	TInt zoom=GetZoom();
	zoom=
		zoom > 2000 ? 2000 :
		zoom > 1500 ? 1500 :
		zoom > 1000 ? 1000 :
		zoom > 500 ? 500 :
		2000;//if you keep zooming out the font and rectangle size becomes large again.
	SetZoomAndDeviceDependentFontL(zoom);
	}


void CExampleHelloControl::SetFullRedraw(TBool aFullRedraw)
	{
	iView->SetFullRedraw(aFullRedraw);
	}

CExampleHelloControl::~CExampleHelloControl()
	{
	delete iText;
	delete iView;
	iZoomFactor.ReleaseFont(iFont);	//releases the last font to be used
	}
//
// Draws a rectangle in a corner of the screen with a white border, then calls
// DrawInRect() to fill the rectangle
//
void CExampleHelloControl::Draw(const TRect& /*aRect*/) const
	{
	CWindowGc& gc=SystemGc();
	TRect rect=Rect();
	rect.Shrink(10,10);
	gc.SetPenStyle(CGraphicsContext::ENullPen);
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.SetBrushColor(KRgbWhite);
	DrawUtils::DrawBetweenRects(gc, Rect(), rect); 
	gc.SetPenStyle(CGraphicsContext::ESolidPen);
	gc.SetPenColor(KRgbBlack);
	gc.SetBrushStyle(CGraphicsContext::ENullBrush);
	gc.DrawRect(rect);
	rect.Shrink(1,1);
	iView->DrawInRect(iZoomFactor, gc, rect, iFont);
	}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区国产精品| 美女一区二区三区| 亚洲一区二区三区免费视频| 麻豆91精品视频| 99久久精品99国产精品| 日韩欧美不卡一区| 夜夜揉揉日日人人青青一国产精品| 久久国产精品无码网站| 在线亚洲一区二区| 国产欧美精品一区二区色综合 | 91成人国产精品| 久久色在线观看| 亚洲成人激情av| 一本色道久久加勒比精品 | 欧美福利视频一区| 综合久久久久久久| 色吊一区二区三区| www国产精品av| 麻豆中文一区二区| 3atv一区二区三区| 亚洲一区自拍偷拍| 91麻豆蜜桃一区二区三区| 国产欧美日韩在线| 韩国欧美国产一区| 久久久久99精品国产片| 久久精品二区亚洲w码| 欧美一区二区三区四区高清| 亚洲一区日韩精品中文字幕| 色呦呦日韩精品| 亚洲美女在线一区| 91美女蜜桃在线| 亚洲欧美偷拍三级| 一本色道综合亚洲| 亚洲一本大道在线| 欧美写真视频网站| 婷婷夜色潮精品综合在线| 欧美日韩一级片网站| 午夜精品久久久久久久99水蜜桃 | 东方aⅴ免费观看久久av| 精品国产一区二区三区av性色 | 久久久久久久久免费| 激情文学综合网| 久久久国产一区二区三区四区小说| 国产真实乱对白精彩久久| 久久久亚洲精品石原莉奈| 成人精品免费看| 一区二区三区.www| 欧美午夜一区二区| 日本中文字幕一区二区有限公司| 日韩一级免费观看| 国产剧情一区二区三区| 亚洲欧美中日韩| 欧美日韩精品欧美日韩精品一综合 | 国产精品久久久久影院老司| 91在线视频官网| 亚洲成人动漫av| 久久久国产午夜精品| 99国产精品久久久久| 亚洲第一在线综合网站| 日韩欧美综合在线| 99精品欧美一区二区三区小说| 一区二区不卡在线播放| 精品久久久久久无| 91麻豆精品一区二区三区| 日韩国产精品久久| 国产精品久久久爽爽爽麻豆色哟哟| 欧洲人成人精品| 国产精品一线二线三线精华| 一区二区三区在线播| 国产精品九色蝌蚪自拍| 在线视频你懂得一区二区三区| 日本免费在线视频不卡一不卡二| 国产女主播在线一区二区| 欧美三级乱人伦电影| 国产一区二区在线视频| 亚洲高清视频中文字幕| 日本一区二区成人在线| 欧美一级免费大片| 色婷婷亚洲婷婷| 黄网站免费久久| 亚洲成人动漫在线观看| 亚洲欧洲无码一区二区三区| 日韩免费一区二区三区在线播放| 色综合天天天天做夜夜夜夜做| 麻豆专区一区二区三区四区五区| 亚洲精选一二三| 国产视频在线观看一区二区三区| 欧美蜜桃一区二区三区 | 精品午夜一区二区三区在线观看| 亚洲欧美日韩一区二区 | 日本一区二区视频在线| 日本精品一区二区三区高清| 国产精品18久久久久久久网站| 亚洲一区二区三区四区在线免费观看| 2014亚洲片线观看视频免费| 欧美日本一道本在线视频| 91论坛在线播放| 成人小视频在线| 精品无人码麻豆乱码1区2区| 伊人婷婷欧美激情| 国产精品电影院| 国产精品私房写真福利视频| 欧美xxx久久| 日韩欧美在线123| 这里只有精品视频在线观看| 欧美在线一区二区三区| 国产大陆a不卡| 国产精品二区一区二区aⅴ污介绍| 26uuu亚洲综合色欧美| 欧美一级高清片| 欧美一区二区三区免费在线看| 欧美中文字幕亚洲一区二区va在线| 成人v精品蜜桃久久一区| 国产99一区视频免费| 国产一区二区三区在线观看精品| 精品在线免费视频| 久久成人免费日本黄色| 精油按摩中文字幕久久| 久久成人羞羞网站| 国产成人综合自拍| 懂色av噜噜一区二区三区av| 成人午夜av电影| 成人免费视频app| 99国产精品久久久久| 91精品1区2区| 欧美精品99久久久**| 日韩一区二区三区免费看| 日韩精品一区二区三区视频 | 亚洲日本在线观看| 秋霞电影网一区二区| 精品美女在线观看| 久久综合色之久久综合| 国产亚洲欧洲一区高清在线观看| 久久久综合网站| 国产精品第五页| 亚洲成人一区在线| 香蕉av福利精品导航| 欧美人体做爰大胆视频| 夜夜嗨av一区二区三区 | 国产精品国产三级国产a| 亚洲精品免费播放| 日韩av中文字幕一区二区 | 欧美国产乱子伦| 亚洲免费观看在线视频| 日韩有码一区二区三区| 成人免费va视频| 欧美日韩国产一区二区三区地区| 日韩欧美在线影院| 亚洲素人一区二区| 日韩和欧美一区二区| 国产经典欧美精品| 欧美少妇一区二区| 精品99久久久久久| 亚洲一区二区三区四区在线观看 | 99久久99久久精品免费观看| 日本道精品一区二区三区| 91精品国产综合久久精品性色| 国产亚洲美州欧州综合国| 亚洲综合色噜噜狠狠| 国产一区视频导航| 欧美日韩国产在线观看| 国产精品久99| 激情综合色综合久久| 欧洲一区二区三区免费视频| 久久一区二区视频| 午夜在线电影亚洲一区| 97久久超碰国产精品| 精品国产凹凸成av人导航| 亚洲一区二区欧美| 国产a精品视频| 欧美不卡一二三| 日日欢夜夜爽一区| 91久久精品一区二区| 国产亚洲欧美激情| 国模大尺度一区二区三区| 欧美日韩中字一区| 亚洲另类一区二区| 成人av一区二区三区| 久久综合国产精品| 日本aⅴ亚洲精品中文乱码| 欧美怡红院视频| 亚洲人成亚洲人成在线观看图片| 国内久久婷婷综合| 精品欧美乱码久久久久久1区2区| 亚洲一二三四区不卡| 日本韩国欧美在线| 亚洲精品国产一区二区三区四区在线 | 欧美成人一区二区| 日韩电影免费在线| 欧美日本在线一区| 日韩精品欧美成人高清一区二区| 91小视频在线| 亚洲人成精品久久久久| 国产91富婆露脸刺激对白| 久久久久国产免费免费| 国产东北露脸精品视频| 久久精品一区八戒影视| 国产传媒日韩欧美成人| 亚洲精品福利视频网站| 色视频欧美一区二区三区|