现在的位置: 首页 > 综合 > 正文

如何将控件controls 画(绘制)到 图(bitmap)上

2013年07月03日 ⁄ 综合 ⁄ 共 2565字 ⁄ 字号 评论关闭

Overview

By default a control will draw itself on the screen by the system
default Gc, but in some cases developers need it to draw itself on a
bitmap, for example when implementing transition effect of view
switching both views' screen shots are needed. The article shows how to
force some controls (derived directly or indirectly from CCoeControl)
to draw them self on a specified bitmap instead of screen.

Solution

The CCoeControl::SetGc() or CCoeControl::SetCustomGc() can be used
to redirect the control's drawing to a custom Gc, but the functions
accept a pointer to a window gc only, that means a bitmap gc can no be
used directly. The CWindowToBitmapMappingGc introduced in Symbian OS
v7.0 can be used to resolve the problem, because it can map all the
operations on a window gc to a bitmap gc.

 

原文地址http://wiki.forum.nokia.com/index.php/How_to_draw_controls_on_bitmap

抱歉!评论已关闭.