Search found 449 matches

by mael15
Thu Oct 08, 2020 6:52 am
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 324

Re: mouseOver lines on wxBitmap

After a look into the sources, it seems that at least under Windows there's dedicated platform specific code that creates a region from a polygon without rendering it into a bitmap. So it's possible that at least under Windows a wxRegion can be both small and fast. I didn't make any performance tes...
by mael15
Tue Oct 06, 2020 1:45 pm
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 324

Re: mouseOver lines on wxBitmap

Sounds good, thanx! I would say there will be max 4000 lines. You think wxRegion is much slower than wxRect? To use both like you suggested, I would have to fill and loop at least two vectors. I would tend to only use wxRegion, what do you think? A nice pre test would be if the mouse is between the ...
by mael15
Tue Oct 06, 2020 12:55 pm
Forum: C++ Development
Topic: mouseOver lines on wxBitmap
Replies: 5
Views: 324

mouseOver lines on wxBitmap

Hi everyone! I have an image of a cogwheel in my app that the user can zoom in: zahnradLinien.jpg I want to enable the user to click and select one of these lines. What would be the best way? I thought about saving a std::vector of the wxRect around each line during the paint process and loop the mo...
by mael15
Tue Aug 25, 2020 8:47 am
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 214

Re: changing a wxLocale object also changes wxFileDialog language

what part of my code has this global effect to change the wxFileDialog language? I thought I only change my documentationLocale?
by mael15
Mon Aug 24, 2020 6:21 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 214

Re: changing a wxLocale object also changes wxFileDialog language

The language of the native dialogs is tighly bound to the locale of the application, i don't think there is anything you can do about it. Can't you change the locale only during the generation of the PDFs and switch back afterwards? switching back would have to take place often because I also have ...
by mael15
Mon Aug 24, 2020 12:55 pm
Forum: C++ Development
Topic: changing a wxLocale object also changes wxFileDialog language
Replies: 4
Views: 214

changing a wxLocale object also changes wxFileDialog language

My program can create pdfs in different languages. I store the selected language in a wxLocale *documentationLocale object and change it with this code: bool wxTranslationHelperCustom::applyNewDocuLanguage(wxLanguage selLang) { if (GetDocuLocale() && (wxLanguage)GetDocuLocale()->GetLanguage() == sel...
by mael15
Fri Aug 21, 2020 1:01 pm
Forum: C++ Development
Topic: Button held down
Replies: 5
Views: 1384

Re: Button held down

I there still no easy way to repeat a function call as long as the user holds down the mouse button? Still have to use a wxTimer?
by mael15
Sun Jul 26, 2020 10:57 am
Forum: C++ Development
Topic: prevent user from entering non ISO-8859-1 characters
Replies: 4
Views: 338

Re: prevent user from entering non ISO-8859-1 characters

What platform? What wx version? Did you look at validate sample to see if its easy enough to do? wxMSW, wx version 3.1.3. I looked into the docs and the validation sample and found it quite complicated to list every single valid character from ISO-8859-1 by hand and then use the include list with a...
by mael15
Sun Jul 26, 2020 7:52 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

Tried it, works, thanx!! =D> :D
by mael15
Tue Jul 21, 2020 9:42 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

The approach with a single wxPdfDC should work for you. Do I not have to set the page size in the wxPdfDC ctor?! wxPdfDC(&pdfDcmt, pageSzMM.x, pageSzMM.y); EDIT: appears like this is not optional. when I use the standard ctor the pages remain empty and this code results in the attached pdf: wxPdfDo...
by mael15
Tue Jul 21, 2020 9:35 am
Forum: C++ Development
Topic: prevent user from entering non ISO-8859-1 characters
Replies: 4
Views: 338

prevent user from entering non ISO-8859-1 characters

Hi, I would like to prevent the user from entering non ISO-8859-1 characters into a wxTextCtrl. First choice would be if one could use a wxTextValidator, i.e. like wxFILTER_ASCII only for ISO-8859-1? Would I have to create my own include list with all possible characters? Second option: somehow test...
by mael15
Tue Jul 21, 2020 9:04 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

Looking at the uncompressed PDF file I see that both templates reference the same bitmap, namely the second of 2 bitmaps. In principle, it should not make a difference whether the bitmap is drawn directly or indirectly. Nevertheless, could you please show the code used to transfer the bitmaps to th...
by mael15
Tue Jul 21, 2020 6:50 am
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

Are the bitmap images added through wxDC/wxPdfDC code? The first one is drawn directly on the wxPdfDC and the second one is first drawn on a wxMemoryDC and then the bitmap is copied to wxPdcDC. The problem is the same when I switch the page sequence. Here is the pdf without compression, thank you v...
by mael15
Mon Jul 20, 2020 2:28 pm
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

but the template data are only saved once to the PDF. That seems to be the cause of my problem. Another use case is, if you want to create a graphics element using wxDC. Then you create a wxPdfDC in template mode and can use the graphics generated by the wxDC resp wxPdfDC class as a template. That ...
by mael15
Mon Jul 20, 2020 12:20 pm
Forum: wxCode
Topic: wxPDFDocument: bitmaps on consecutive pages
Replies: 15
Views: 1526

Re: wxPDFDocument: bitmaps on consecutive pages

i there a documentation about when to use templates at all? I suspect I do not need them. It is so long ago that I started using them that I do not remember why I did it.