Search found 152 matches

by dkaip
Sun Jun 24, 2018 7:02 pm
Forum: wxCode
Topic: De-serializing a wxFont for a pdf file fails.
Replies: 1
Views: 24

De-serializing a wxFont for a pdf file fails.

Hi. I have serialize a font as wxString and then de-serializing with wxFromString, i am trying to register and set font for pdf document, but nothing happens. What i am doing wrong? Thank's Jim if(!font.IsNull()) { wxFont f; wxFromString(font,&f); wxPdfFontManager* fm = wxPdfFontManager::GetFont...
by dkaip
Thu Jun 21, 2018 7:12 pm
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Re: Place of image ...

The code is part of diff-pdf. Sizer has only the bitmap. // ctor wxBitmap dummyBitmap(16, 16); m_content = new wxStaticBitmap(this, wxID_ANY, dummyBitmap); wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(m_content, wxSizerFlags(1).Expand()); SetSizer(sizer); class BitmapViewer : public wx...
by dkaip
Thu Jun 21, 2018 6:57 am
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Re: Place of image ...

Hi.
To put a shape in a certain place, and in zoom operation to see at place as viewing before.
Just for study ...
Thank you.
by dkaip
Wed Jun 20, 2018 6:50 am
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Re: Place of image ...

Suppose in code that i am study, i want to put scaled bitmap at certain place, so with this way i will know the exact coordinates of image,but how i must put inside in a pos?

Thank you.
by dkaip
Wed Jun 20, 2018 5:09 am
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Re: Place of image ...

No, GetSizer()->FitInside(this); is the last line in function.
by dkaip
Tue Jun 19, 2018 5:58 pm
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Re: Place of image ...

Every time that a bitmap fits inside a wxSizer, depending of bitmap size and screen size, fits with different ways. If you want to put at image shapes that are objects, not embedding inside, the shapes depends from current image zoom factor. So to make a coordinate convert you must know the exactly ...
by dkaip
Tue Jun 19, 2018 7:06 am
Forum: C++ Development
Topic: Place of image ...
Replies: 9
Views: 159

Place of image ...

Hello. In code bellow(is from diff-pdf from TT solution) how i can know the exactrly points of image inside the sizer? Thank's Jim if ( new_w != m_orig_image.GetWidth() || new_h != m_orig_image.GetHeight() ) { scaled = m_orig_image.Scale ( new_w, new_h, // we don't need HQ filtering when upscaling m...
by dkaip
Fri Jun 15, 2018 4:22 am
Forum: wxCode
Topic: Limits of import pdf page
Replies: 4
Views: 94

Re: Limits of import pdf page

Thank you very match for your answer. I will study template to understand the mechanism.
Jim.
by dkaip
Thu Jun 14, 2018 9:04 pm
Forum: wxCode
Topic: Limits of import pdf page
Replies: 4
Views: 94

Re: Limits of import pdf page

This means that inserting page has two different scales, scaleX and scale Y Suppose we have ... Page to be importing .. lx1,ly1 GetLeftMarging a1 GetRightMarging b1 GetTopMarging c1 pdf doc page ... lx2,ly2 GetLeftMarging a2 GetRightMarging b2 GetTopMarging c2 The area (lx1-a1-b1)X(ly1-c1-c1) must c...
by dkaip
Thu Jun 14, 2018 2:17 pm
Forum: C++ Development
Topic: Simulate photoprint open source program
Replies: 2
Views: 158

Re: Simulate photoprint open source program

Sorry for my delay... Here is a photoprint ... in linux. I never use windows ...
ep.png
ep.png (26.11 KiB) Viewed 93 times
by dkaip
Thu Jun 14, 2018 1:24 pm
Forum: wxCode
Topic: Limits of import pdf page
Replies: 4
Views: 94

Limits of import pdf page

Importing a page in pdf document and inserting a page how i can know the limits of import? I am thinking that left and right are GetLeftMargin(); and GetTopMargin(); Is that right? But what is bottom and right space? How i can find it? Thank's Jim afile.AddPage(-1,pageWidth,pageHight); int tpl = afi...
by dkaip
Tue Jun 12, 2018 3:11 pm
Forum: wxCode
Topic: Top left image position
Replies: 3
Views: 164

Re: Top left image position

Thank's, as i see i must catch coordinates immediately after image inserting.
Jim
by dkaip
Mon Jun 11, 2018 1:47 pm
Forum: C++ Development
Topic: Having two screens how i get in what display are my mouse?
Replies: 1
Views: 59

Having two screens how i get in what display are my mouse?

I have two screens and the main is with number 1, not 0. My mouse is in 0 screen. How i can get ScreenDX and ScreenDY sizes from screen that mouse are? //Get Display Count const size_t DisplayCount = wxDisplay::GetCount(); switch (DisplayCount) { //This is the case when there is only one monitor cas...
by dkaip
Sat Jun 02, 2018 5:27 am
Forum: wxCode
Topic: Top left image position
Replies: 3
Views: 164

Re: Top left image position

As i Just see is code ok? from top left to bottom down?
It works, but is the right way?

Code: Select all

double x=aFile.GetX();
double y=aFile.GetY();
aFile.Line(x,y,aFile.GetLastImageBottomRightX(),aFile.GetLastImageBottomRightY());
by dkaip
Sat Jun 02, 2018 5:18 am
Forum: wxCode
Topic: Top left image position
Replies: 3
Views: 164

Top left image position

Hello. Inserting an image in a page with Image(file) function, i dont know the top left corner of image in pdf page? How i can find it? Code bellow don't gives me top left. Thank's Jim aFile.Line(aFile.GetRightMargin(),aFile.GetTopMargin(),aFile.GetLastImageBottomRightX(),aFile.GetLastImageBottomRig...

Go to advanced search