⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 Delphi Dib usage components. These ise a dib-paintbox... u can use them. :>)
💻 TXT
字号:
Well, because my time is very limited, I prefer to attach the original doc
provide by John B, the real creator of this files.
My work was only to structure some things, and encapsulate his objects
in a reusable object (TDIBSurface) and a VCL component (TDIBPaintBox)
Well, see the demo, and enjoy it!

Finally, I'll appreciate any feedback about enhancements (or problems)
that you make to this stuff

Cheers
	Agustin (Qxo) Villena
	avillena@dcc.uchile.cl

PD : Sorry by my pooor english :)

:::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::: Original Read_ME ::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::

DIB and Palette demo code project thingy wotsit.
------------------------------------------------

Donated to the Public domain by me
John Biddiscombe
J.Biddiscombe@rl.ac.uk

-----------------------------------------
this is for 256 colour display modes only
-----------------------------------------

I always use 236 colour palettes to spare windows the grief of mucking up my
colours.
When show system colours is checked, 0-9 and 246-255 are visible too

basically assume you have 236 colours and plot 10 upwards.
->the sinusoid demo covers it nicely.

-
also
 in the Create method for the DIB_surface_object the Pal_indices are allowed
 an offset, I've used 0, but if you put 10 in, then your colours can be
 accessed from 0-235 instead of 10-245. (Handy - I've used this lately)

You can use all the normal API calls to draw on the DIB, just use the DC of
the DIB and moveto,lineto as normal.

I use the DIB really only for doing colour plots of 2D data, so I select
(usually HSV) a palette and just plot pixels.


NB - some of the palettes I've included are not 236 entries,
EG CHROMA.PAL...
The palette creation routine in Palunit, wraps the colours round if there are less
than 236, you should check the pal_colours variable if you want to do something
like the sinusoid without dodgy colours appearing.

Nearly all my programs use ONE palette at a time, so if you have an MDI type
program and need different palettes in different windows, then I guess you know
what you are doing and don't need my help modifying this code.

I must thank the Fractint/WinFract team for allowing me to steal their palettes
and distribute them. For an example of these palettes in action have a look
at Zonerings on
                http://www.hyperreal.com/tools/win3/graphics/eye_candy/

I must also add that most of the palettes are cyclic (wrap around) - because I
used them for palette cycling.


DELPHI SCREWS UP YOUR PALETTES - I'm sure the people at Borland meant well when
they did all the Delphi graphics stuff, but all my software worked just fine
under BPW, and I had to make a lot of modifications when porting to Delphi
regarding Palette stuff. (and DC's but that's another story).


I Hope this helps someone.

John B


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -