高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】invalidating - view problem
invalidating - view problem
invalidating - view problem
hi,
i have the problem that the viewportclipping region dosn't change his initial size if i change windows size.
at "exgdivectorizeview::update()", the resize call te driver returns
at the statement "if(isvalid())" (because of isvalid() returns ever true).
is there a way to invalidate the view again?
why this work in the mfc sample, i use bb6 here?
here is my "onsize code"
if(false == m_pdevice.isnull() && clientwidth > 0 && clientheight > 0)
{
trect rect;
rect.left = 0;
rect.top = 0;
rect.right = clientwidth;
rect.bottom = clientheight;
odgsdcrect outputrect( odgsdcpoint(rect.left, rect.bottom), odgsdcpoint(rect.right, rect.top));
m_pdevice->onsize(outputrect);
invalidate();
}
//************************************************** *****************************/
// update()
//************************************************** *****************************/
void exgdivectorizeview::update()
{
if(regenabort() || !isvisible() || !isviewportvisible())
return ;
if(isvalid())
{
odgsbasevectorizeview::update(); // viewport border still needs to be drawn
return ;
}
// todo -- move this code to loadviewport() in 1.15
// conditions like above must be taken into account by odgsbasevectorizeview::update()
...
michael
attached images
this is a minor dd issue, attached archive contains fix for it (it can be reproduced in singledoc sample).
attached files (106.6 kb, 48 views)
sincerely yours,
george udov
quote:
originally posted by george udov
this is a minor dd issue, attached archive contains fix for it (it can be reproduced in singledoc sample).
and it works!
great,
thank you!
michael
|