Search found 86 matches

by xin.songtao
Wed Mar 18, 2009 2:34 am
Forum: C++ Development
Topic: who can explain this for me?(Big Image To Draw)
Replies: 10
Views: 2319

I should append some pictures.

when use the BufferDC,
bufferDc.SetUserScale( m_dZoomFactor,m_dZoomFactor );
bufferDc.DrawBitmap( bitmap,pt );
bufferDc.SetUserScale( 1.0,1.0);


the left is normal, the right is bufferDC

Image
by xin.songtao
Tue Mar 17, 2009 11:41 am
Forum: C++ Development
Topic: who can explain this for me?(Big Image To Draw)
Replies: 10
Views: 2319

1、 p.s. why don't you move the SetUserScale calls outside the 'for' loops? This is a imperfect code, i have move the SetUserScale outside the loops. But why do you still use the wxMomoryDC+Blit? You can directly paint the blocks on the wxPaintDC at (i*blockW, j*blockH) coordinates, right? Rolling Ey...
by xin.songtao
Mon Mar 16, 2009 3:01 pm
Forum: C++ Development
Topic: who can explain this for me?(Big Image To Draw)
Replies: 10
Views: 2319

Maybe there is just not enough memory for the buffer?...
I agree with you.

And i also do this ,but the flicker is still exist.
EVT_ERASE_BACKGROUND( MyCtrl::OnEraseBackGround)

Maybe I will try the other ways.

Thanks !
by xin.songtao
Mon Mar 16, 2009 11:20 am
Forum: C++ Development
Topic: SetUserScale internals
Replies: 4
Views: 1026

the code in below is mine, hope for help you.

It works well for small images( like 8000*4000 ),can be drag easily,zoom in and zoom out quickly.

http://forums.wxwidgets.org/viewtopic.php?t=23426
by xin.songtao
Mon Mar 16, 2009 11:02 am
Forum: C++ Development
Topic: How to put a file inside a zip file
Replies: 7
Views: 2493

I compress the files into "a images.zip", for reference only.:D :D bool CreateImageZip(const wxString &ressoureDir, const wxString &destPath) { wxString sep(wxFileName::GetPathSeparator()); wxArrayString files; wxDir::GetAllFiles(ressoureDir,&files);//the dir contented all the files need to compress...
by xin.songtao
Mon Mar 16, 2009 9:58 am
Forum: C++ Development
Topic: who can explain this for me?(Big Image To Draw)
Replies: 10
Views: 2319

who can explain this for me?(Big Image To Draw)

Hi, wxFans! I use wxBufferedPaintDC to draw the big image ,the image size is larger than 10000*5000,I divide the image to blocks,when the image loaded,the blocks size is small(500*500),and then I use a wxBitmap vector to store the blocks. In OnPaint , I draw block by block, the following is the code...
by xin.songtao
Thu Oct 23, 2008 4:59 am
Forum: C++ Development
Topic: How to convert a Unicode string to \uXXXX?
Replies: 1
Views: 729

Re: How to convert a Unicode string to \uXXXX?

hi,guys,please give me some suggestions. I want to convert a unicode string to \uXXXX , like this: UTF-8 L"中文" convert to is "\uXXXX\uXXXX"(e.g maybe the result is \u4E2D\u6587); How to convert? please give me some suggestions. THanks! I have solve it! wxString GB2UnicodeEncoding(const wxString &st...
by xin.songtao
Wed Oct 22, 2008 4:34 pm
Forum: C++ Development
Topic: How to convert a Unicode string to \uXXXX?
Replies: 1
Views: 729

How to convert a Unicode string to \uXXXX?

hi,guys,please give me some suggestions.
I want to convert a unicode string to \uXXXX ,

like this:

UTF-8 L"中文" convert to is "\uXXXX\uXXXX"(e.g maybe the result is \u4E2D\u6587);

How to convert? please give me some suggestions.


THanks!
by xin.songtao
Wed Oct 01, 2008 2:33 pm
Forum: C++ Development
Topic: Help! In the wxSplitterWindow directiion keys change focus.
Replies: 3
Views: 908

OH!So Great!wxWANTS_CHARS It works!

I add wxWANTS_CHARS to the style flag when creating the wxWindow,but not the splitter window.I don't know whether it will cause other problem。

But thanks doublemax。
by xin.songtao
Wed Oct 01, 2008 1:42 pm
Forum: C++ Development
Topic: Help! In the wxSplitterWindow directiion keys change focus.
Replies: 3
Views: 908

IS there anyone who can help me?
Or anyone who met the same question either?


thanks
by xin.songtao
Sun Sep 28, 2008 3:42 am
Forum: C++ Development
Topic: Help! In the wxSplitterWindow directiion keys change focus.
Replies: 3
Views: 908

Help! In the wxSplitterWindow directiion keys change focus.

hi! All. I create a splitter window, creating two subwindows and hiding one of them. but now,when I want to deal with the key events in one of the subwindow, I find out that I can't get the directiion keys events, and the directiion keys will change the focus between of the two subwindows. the focus...
by xin.songtao
Wed Sep 03, 2008 4:58 am
Forum: C++ Development
Topic: Search for a solution to drag big picture
Replies: 8
Views: 1647

Thanks, I will have a try :)
by xin.songtao
Tue Sep 02, 2008 2:15 pm
Forum: C++ Development
Topic: Search for a solution to drag big picture
Replies: 8
Views: 1647

hello,T-Rex。
I am sorry that I think the "Simple Image Viewer" is not too much helpful to me. but thanks all the same. :D
by xin.songtao
Tue Sep 02, 2008 11:04 am
Forum: C++ Development
Topic: Search for a solution to drag big picture
Replies: 8
Views: 1647

:D thanks !
I will look carefully through the website tonight(Here is Chinese Beijing time).
by xin.songtao
Tue Sep 02, 2008 9:49 am
Forum: C++ Development
Topic: Search for a solution to drag big picture
Replies: 8
Views: 1647

To get highly-efficient scale and panning for very big images, you might get better results with tiling your image. Basically, cut in it smaller squares. So when you zoom it, you don't need to draw everything, only the currently visible tiles. There may be other ways as well, like using OpenGl for ...