-
Ming (09.03.10 02:35) [0]Hello. Please sorry my write English.
I try make scroll of text on canvas but no do.
Then try control paintbox but no do too.
Want do convert of VCL to KOL the marquee same http://www.delphiarea.com/products/delphi-components/marquee/
The KOL is best but the canvas is no work. Please helping?
Component is there already to use? -
Ming (10.03.10 00:29) [1]Please to masters have demo for test of text to scroll on KOL form? Today try canvas no work do fail.
-
http://kolmck.net/demos/adv.zip
Did you look at this demo or other?
You provide very small portion of information to understand what you want. If you want to paint on canvas NOT in the OnPaint event handler - just forget it. Moving label is not so bad decision to implement marque, too. -
Ming (11.03.10 00:43) [3]Demo adv.zip is very good. I do thank you to show.
Sorry for small information - English is very trying.
Moving label for marquee scroll text is required please.
I was try ScrollDC but no working - text not draw.
How to make easy moving text with very smooth? -
adv.zip comes with the source. It contains enough to implement marque moving label. Very smooth - you need work directly with video card using DirectX or OpenGL. Smooth enough can be implemented using OnPaint. To scroll faster bigger window you can use ScrollWindow API, see docs in MSDN on it.
-
Ming (14.03.10 00:05) [5]OK - using mmtimer and label not smooth.
ScrollWindow or ScrollDC needing timer also.
Trying OnPaint but canvas show redraw.
DirectX and OpenGL being very complex KOL.
Using old slow windows 95 - recommend code? -
Using old slow windows 95 - are you seriously? Last 5 years I can run it only from virtual machines, and on a rarity Pentium I machine I still have in my home museum :)
http://kolmck.net/demos/DemoSmoothScroll_Thread.zip -
Ming (14.03.10 14:41) [7]Vladimir Kladov thank much for code - not expecting but happy lots.
You master really and making time for me is great honour.
Test working but scrolling need smooth so will looking at DirectX or OpenGL.
Is working best one or other? I finding OpenGL12 and OpenGLContext on site. -
You need smoother? Try this: Allocate 2 bitmaps, on first paint as is on second with shift 1/2 pixel using following pseudo-code:Bmp22 := NewDibBitmap(Bmp1.Width * 2, Bmp1.Height * 2, pf32bit);
SetStretchBltMode( Bmp22.Handle, halftone );
Bmp1.StretchDraw( Bmp22.Canvas.Handle, MakeRect( 1, 1, Bmp22.Width+1, Bmp22.Height+1 );
Bmp2 := NewDibBitmap( Bmp1.Width, Bmp1.Height, pf32bit );
Bmp22.StretchDraw( Bmp2.Canvas.Handle, Bmp2.BoundsRect );
Bmp22.Free;
then in thread draw on even step Bmp1 and on odd step Bmp2. Certainly, without ScrollWindow this way, since it can not scroll by 1/2 pixel.
OpenGL make gives smoother results but I very doubt that under Win95. -
Ming (18.03.10 01:19) [9]OK - I made work you idea of StretchDraw double size then StretchDraw normal size (thanking you) but result bitmap is not clean like smudge effect. I keep do new trying...
-
Re-download again demo. I made 1/2 pixels scroll too. It is better not to use ScrollWindow at all either aditionally invalidate two columns of pixels following a call ScrollWindow.
Using halftone (SetStretchBlt) is not supported in 95 but this is not so important (if to comment there 2 calls difference is very small for eyes if it exists at all). -
Ming (19.03.10 01:55) [11]Thank for code, you do so easy in few lines, my try was lots.
Beautiful KOL make good and the MCK easy - my praising you.
But same problem you as do I have - font now looking like bold.
Compare old version with new the text looking cleaner first.
I go try Windows 200 computer for SetStretchBlt work.
Please too - look at KOL site:
- OpenGL compile ok but run new program exe is no drawing
- Possible for DirectX working on KOL - no find? -
Bold because I made it bold. If not it seems that 1/2 shifted image will be looking then not shifted even with anti-aliasing forced.
OpenGL (OGL12 + OpenGLContext) has a demo, use it as a prototype for a project.
DirectX was not planned to support at all. Too many revolutions in each DirectX version.