Home » Community » U++ community news and announcements » 2019.2 rc5
Re: 2019.2 (pre)released [message #52560 is a reply to message #52559] |
Tue, 22 October 2019 12:20 |
Tom1
Messages: 1251 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
Thanks! I will look into your suggestions next.
Meanwhile, here's a "crashable" testcase:
#include <CtrlLib/CtrlLib.h>
#include <Painter/Painter.h>
using namespace Upp;
class BufferPainterCreateCrash: public TopWindow{
public:
ImageBuffer ib;
BufferPainter bpainter;
Image largeimage;
BufferPainterCreateCrash(){
Sizeable().MaximizeBox().MinimizeBox();
bpainter.PreClipDashed();
ImageBuffer lib(10000,10000);
BufferPainter bp(lib);
bp.Clear(LtGray());
largeimage=lib;
}
void Paint(Draw &draw){
SetSurface(draw,Rect(ib.GetSize()),ib,ib.GetSize(),Point(0,0));
}
void Render(Point p){
// Use local bpainter below instead of bpainter.Create to avoid crash:
//BufferPainter bpainter(ib);
//bpainter.PreClipDashed();
bpainter.Create(ib);
bpainter.EvenOdd();
bpainter.Co();
bpainter.Clear(White());
bpainter.Rectangle(0,0,GetSize().cx,GetSize().cy);
bpainter.Fill(largeimage);
int fh=StdFont().GetHeight();
bpainter.Text(10,fh,Format("Cursor now at %`, %`",p.x,p.y),StdFont()).Fill(Black());
bpainter.Text(10,2*fh,"Grab the window by the edge and resize wildly. Expect crash...",StdFont()).Fill(Black());
bpainter.Finish();
// Fast updates
if(GetTopCtrl()&&GetTopCtrl()->GetHWND()){
ViewDraw draw(this);
SetSurface(draw,Rect(ib.GetSize()),ib,ib.GetSize(),Point(0,0));
}
// For slow / delayed updates use Refresh() instead:
// Refresh();
}
void Layout(){
ib.Create(GetSize());
Render(Point(0,0));
}
void MouseMove(Point p, dword keyflags){
Render(p);
}
};
GUI_APP_MAIN
{
BufferPainterCreateCrash().Execute();
}
Best regards,
Tom
|
|
|
|
|
2019.2 rc5
By: mirek on Mon, 21 October 2019 11:57
|
|
|
Re: 2019.2 (pre)released
By: Oblivion on Mon, 21 October 2019 12:47
|
|
|
Re: 2019.2 (pre)released
By: mirek on Mon, 21 October 2019 12:51
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Mon, 21 October 2019 15:40
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Mon, 21 October 2019 16:08
|
|
|
Re: 2019.2 (pre)released
By: mirek on Mon, 21 October 2019 16:35
|
|
|
Re: 2019.2 (pre)released
By: mirek on Mon, 21 October 2019 17:02
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Mon, 21 October 2019 18:05
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 09:18
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 10:49
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 11:37
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 11:47
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 11:51
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 11:55
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 12:20
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 13:51
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 14:33
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Wed, 23 October 2019 08:34
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 12:37
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 12:42
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 12:51
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 11:03
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 11:10
|
|
|
Re: 2019.2 (pre)released
By: Tom1 on Tue, 22 October 2019 11:18
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 09:46
|
|
|
Re: 2019.2 (pre)released
By: Oblivion on Tue, 22 October 2019 12:55
|
|
|
Re: 2019.2 (pre)released
By: mirek on Tue, 22 October 2019 14:22
|
Goto Forum:
Current Time: Fri Nov 01 00:45:26 CET 2024
Total time taken to generate the page: 0.02614 seconds
|