• 5892阅读
  • 3回复

关于绘图中的clipping [复制链接]

上一主题 下一主题
离线yleesun
 

只看楼主 倒序阅读 楼主  发表于: 2010-03-02
QPainter中的clipping功能是什么意思?看了帮助文档是这么描述的,但是还是不怎么理解?请高手指点!

Clipping

QPainter can clip any drawing operation to a rectangle, a region, or a vector path. The current clip is available using the functions clipRegion() and clipPath(). Whether paths or regions are preferred (faster) depends on the underlying paintEngine(). For example, the QImage paint engine prefers paths while the X11 paint engine prefers regions. Setting a clip is done in the painters logical coordinates.

After QPainter's clipping, the paint device may also clip. For example, most widgets clip away the pixels used by child widgets, and most printers clip away an area near the edges of the paper. This additional clipping is not reflected by the return value of clipRegion() or hasClipping().
离线benbenmajia

只看该作者 1楼 发表于: 2010-03-02
说实话,当时我根本就不懂到底是干什么的,没用...过
安然.....
离线yleesun

只看该作者 2楼 发表于: 2010-03-02
有谁知道啊 !!!!
离线sbtree
只看该作者 3楼 发表于: 2010-03-02
剪辑功能,在绘制区剪辑掉不需要的部分,配合setClipPath和setClipRegion制作不规则窗体的时候很有用
windows 7 + VC++2008 + Qt4.5.2
快速回复
限100 字节
 
上一个 下一个