Search found 539 matches
- Fri Aug 13, 2021 10:07 am
- Forum: wxCode
- Topic: wxPDFDocument speed up DrawLines
- Replies: 15
- Views: 14377
Re: wxPDFDocument speed up DrawLines
okay, one step further, it is not bitmap size but pen width. wxLongLong startTime, timeSpan; const int numPoints = 1000; wxPoint pntArr[numPoints]; for (int i = 0; i < numPoints; i++) pntArr[i] = wxPoint(rand() % 1000, rand() % 1000); wxBitmap btmp(1000, 1000); wxMemoryDC mdc(btmp); auto drawLinesWi...
- Fri Aug 13, 2021 9:19 am
- Forum: wxCode
- Topic: wxPDFDocument speed up DrawLines
- Replies: 15
- Views: 14377
Re: wxPDFDocument speed up DrawLines
As far as i understood, you draw a lot of lines into a wxMemoryDC, and at a bitmap size of 1039x1039 it's fast and at 1091x1091 it's slow? Yes! Did you confirm that the actual drawing takes so long? Or could it be something else. Yes, the time measured is only for the mdcPff.DrawLines(numPntsToPain...
- Fri Aug 13, 2021 8:55 am
- Forum: wxCode
- Topic: wxPDFDocument speed up DrawLines
- Replies: 15
- Views: 14377
Re: wxPDFDocument speed up DrawLines
Which wxDC do you use to draw on screen? And what is the bitmap your're talking about? Or do you mean "wxDC size"? I draw on a wxMemoryDC, would you recommend something else? Is this wxPDFDoc related at all? No, it is size related und since the pdfs I create have 300dpi, it is painted on ...
- Thu Aug 12, 2021 2:00 pm
- Forum: wxCode
- Topic: wxPDFDocument speed up DrawLines
- Replies: 15
- Views: 14377
Re: wxPDFDocument speed up DrawLines
sorry, I explained it badly. I now found out that the problem is not wxPDFDoc specific, it also exists in the app on screen: 1039x1039px = 0.1s 1091x1091px = 2.3s i guess there is some sort of buffering being activated at this bitmap size? It only appears with DrawLines, not when I draw circles on t...
- Tue Aug 10, 2021 10:13 am
- Forum: wxCode
- Topic: wxPDFDocument speed up DrawLines
- Replies: 15
- Views: 14377
wxPDFDocument speed up DrawLines
I have to draw a recorded signal on a xy plot that has ~10.000 lines. Using the DrawLines function this works nearly instantaneous in my app on screen, but takes a couple of seconds with wxPDFDocument. Is there a way to speed things up in wxPDFDocument? Thanx! EDIT: i have seen in tests that there i...
- Sun Jul 11, 2021 1:12 pm
- Forum: C++ Development
- Topic: enter key is not handled?
- Replies: 2
- Views: 1778
Re: enter key is not handled?
worked, thanx!
- Sun Jul 11, 2021 12:05 pm
- Forum: C++ Development
- Topic: enter key is not handled?
- Replies: 2
- Views: 1778
enter key is not handled?
hi everyone,
i am handling key events in a class that inherits from wxFrame with it is triggert by all kinds of keys, but not the WXK_RETURN. Is this something i have to activate like in wxTextCtrl with wxTE_PROCESS_ENTER?
i am handling key events in a class that inherits from wxFrame with
Code: Select all
Bind(wxEVT_KEY_DOWN, &MainFrame::onKeyDown, this);
- Mon Jul 05, 2021 8:18 am
- Forum: C++ Development
- Topic: wxImage::LoadFile and wxFile::Exists default dir
- Replies: 1
- Views: 1170
wxImage::LoadFile and wxFile::Exists default dir
on my windows computer, wxImage::LoadFile and wxFile::Exists find and load a file only by its filename, without a path. i cannot find this file anywhere, neither in my .exe dir nor the user´s documents folder. also, the windows file file search cannot find it, so where is it? what is the default dir...
- Sun Jun 27, 2021 10:27 am
- Forum: C++ Development
- Topic: draw bitmap darker as if it had 50% transparency
- Replies: 3
- Views: 2734
Re: draw bitmap darker as if it had 50% transparency
just in case someone has the same problem: wxBitmap::ConvertToDisabled(126) does the trick https://docs.wxwidgets.org/3.1.2/classw ... 54349bc22d
- Tue May 25, 2021 1:06 pm
- Forum: wxCode
- Topic: PDF digital signature
- Replies: 3
- Views: 12098
Re: PDF digital signature
thanx, i already suspected this. any recommendation?
- Tue May 25, 2021 11:40 am
- Forum: C++ Development
- Topic: find what triggered OnPaint
- Replies: 3
- Views: 1034
Re: find what triggered OnPaint
thanx, that´s what i thought, but like i wrote i have another class with the same inheritance and it does not trigger a paint event. so i thought this would exclude some internal wxScrolled<wxPanel> reason, but maybe both trigger the event and one of them vetos it somewhere? would be even more diffi...
- Tue May 25, 2021 9:54 am
- Forum: wxCode
- Topic: PDF digital signature
- Replies: 3
- Views: 12098
PDF digital signature
I create PDFs using wxPdfDocument. Due to a new law/regulation/certification in Germany I have to find a way to add a digital signature. Is there a way to do this without using some other tool after creating the PDF? I would like to create and sign it in one go without the user of my app having to c...
- Tue May 25, 2021 8:02 am
- Forum: C++ Development
- Topic: find what triggered OnPaint
- Replies: 3
- Views: 1034
find what triggered OnPaint
I have OnPaint events that I need to find the trigger for. I have caught all explicit Refresh() in my code using this with a breakpoint: void refresh() { Refresh(); } But the OnPaint code is still called from somewhere else. This is in a class inheriting from wxScrolled<wxPanel> after an OnMouseWhee...
- Tue May 25, 2021 7:02 am
- Forum: C++ Development
- Topic: draw bitmap darker as if it had 50% transparency
- Replies: 3
- Views: 2734
Re: draw bitmap darker as if it had 50% transparency
okay, thank you, then just painting with darker colors is the easier option for me.
- Sun May 23, 2021 9:40 am
- Forum: C++ Development
- Topic: draw bitmap darker as if it had 50% transparency
- Replies: 3
- Views: 2734
draw bitmap darker as if it had 50% transparency
i use DrawBitmap to draw some bitmaps (each with a wxMask) on a black background. is there any way to draw some of them darker, as if they had a 50% transparency? i do not want to repaint those with darker colors.
my goal is to highlight one of these bitmaps visually.
my goal is to highlight one of these bitmaps visually.