Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DrawDIB

Posted on 1998-11-02
10
Medium Priority
?
473 Views
Last Modified: 2010-04-06
Has anybody got the pascal implementation of the DrawDIB functions? And/or an example how to use it (even in C)?

Hi Igor: I want to try this for drawing the spectrum, do you think it's a good idea?

sincerely, Matvey
0
Comment
Question by:Matvey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 1345485
Hello
Not sure this is what you want but hope this is of help .it is DrawDIB.Pas

InThe


unit DrawDIB;
interface
uses WinTypes;
const  {DrawDIB Flag Constants}
  DDF_0001              = $0001;
  DDF_UPDATE            = $0002;
  DDF_SAME_HDC          = $0004;
  DDF_SAME_DRAW         = $0008;
  DDF_DONTDRAW          = $0010;
  DDF_ANIMATE           = $0020;
  DDF_BUFFER            = $0040;
  DDF_JUSTDRAWIT        = $0080;
  DDF_FULLSCREEN        = $0100;
  DDF_BACKGROUNDPAL     = $0200;
  DDF_NOTKEYFRAME       = $0400;
  DDF_HURRYUP           = $0800;
  DDF_HALFTONE          = $1000;
  DDF_2000              = $2000;
  DDF_PREROLL           = DDF_DONTDRAW;  DDF_SAME_DIB          = DDF_SAME_DRAW;
  DDF_SAME_SIZE         = DDF_SAME_DRAW;  {DrawDIBProfileDisplay Constants}
  PD_CAN_DRAW_DIB       = $0001;  PD_CAN_STRETCHDIB     = $0002;
  PD_STRETCHDIB_1_1_OK  = $0004;  PD_STRETCHDIB_1_2_OK  = $0008;
  PD_STRETCHDIB_1_N_OK  = $0010;type  HDrawDIB              = HDC;
  DWord                 = LongInt;
  PBitmapInfoHeader     = ^TBitmapInfoHeader;
  LPVoid                = Pointer;
  TDrawDIBTime = record
    timeCount:        LongInt;
    timeDraw:         LongInt;
    timeDecompress:   LongInt;
    timeDither:       LongInt;
    timeStretch:      LongInt;
    timeBlt:          LongInt;
    timeSetDIBits:    LongInt;
  end;
  PDrawDIBTime          = ^TDrawDIBTime;
function  DrawDIBInit: WordBool; far;
function  DrawDIBOpen: HDrawDIB; far;
function  DrawDIBClose(hDD: HDrawDIB): WordBool; far;
function  DrawDIBGetBuffer(hDD: HDrawDIB; pbmpInfo: PBitmapInfoHeader;dwSize, dwFlags: DWord): LPVoid; far;
function  DrawDIBError(hDD: HDrawDIB): Word; far;
function  DrawDIBGetPalette(hDD: HDrawDIB): HPalette; far;
function  DrawDIBSetPalette(hDD: HDrawDIB; hPal: HPalette):         WordBool; far;
function  DrawDIBChangePalette(hDD: HDrawDIB; nStart, nLen: Integer;  pPalEntry: PPaletteEntry): WordBool; far;
function  DrawDIBRealize(hDD: HDrawDIB; hbmpDC: HDC;
          fBackground: WordBool): Word; far;
function  DrawDIBStart(hDD: HDrawDIB; dwRate: DWord): WordBool; far;
function  DrawDIBStop(hDD: HDrawDIB): WordBool; far;
function  DrawDIBBegin(hDD: HDrawDIB; hbmpDC: HDC; dxDst, dyDst: Integer;pbmpInfo: PBitmapInfoHeader; dxSrc, dySrc: Integer;
                       wFlags: Word): WordBool; far;
function  DrawDIBDraw(hDD: HDrawDIB; hBmp: HDC;xDst, yDst, dxDst, dyDst: Integer;pbmpInfo: PBitmapInfoHeader; lpBits: LPVoid;
xSrc, ySrc, dxSrc, dySrc: Integer;wFlags: Word): WordBool; far;
function  DrawDIBUpdate(hDD: HDrawDIB; hbmpDC: HDC;
                        xDst, yDst: Integer): WordBool; far;
function  DrawDIBEnd(hDD: HDrawDIB): WordBool; far;
function  DrawDIBTime(hDD: HDrawDIB; pDDTime: PDrawDIBTime): WordBool; far;
function  DrawDIBProfileDisplay(pbmpInfo: PBitmapInfoHeader): DWord; far;
implementationfunction  DrawDIBInit: WordBool; external 'MSVideo';
function  DrawDIBOpen: HDrawDIB; external 'MSVideo';
function  DrawDIBClose(hDD: HDrawDIB): WordBool; external 'MSVideo';
function  DrawDIBGetBuffer(hDD: HDrawDIB; pbmpInfo: PBitmapInfoHeader;
                           dwSize, dwFlags: DWord): LPVoid; external 'MSVideo';
function  DrawDIBError(hDD: HDrawDIB): Word; external 'MSVideo';
function  DrawDIBGetPalette(hDD: HDrawDIB): HPalette; external 'MSVideo';
function  DrawDIBSetPalette(hDD: HDrawDIB; hPal: HPalette): WordBool;
                            external 'MSVideo';
function  DrawDIBChangePalette(hDD: HDrawDIB; nStart, nLen: Integer;pPalEntry: PPaletteEntry): WordBool;external 'MSVideo';
function  DrawDIBRealize(hDD: HDrawDIB; hbmpDC: HDC;      fBackground: WordBool): Word; external 'MSVideo';
function  DrawDIBStart(hDD: HDrawDIB; dwRate: DWord): WordBool;
                       external 'MSVideo';
function  DrawDIBStop(hDD: HDrawDIB): WordBool; external 'MSVideo';
function  DrawDIBBegin(hDD: HDrawDIB; hbmpDC: HDC; dxDst, dyDst: Integer; pbmpInfo: PBitmapInfoHeader; dxSrc, dySrc: Integer;wFlags: Word): WordBool; external 'MSVideo';
function  DrawDIBDraw(hDD: HDrawDIB; hBmp: HDC;
xDst, yDst, dxDst, dyDst: Integer;pbmpInfo: PBitmapInfoHeader; lpBits: LPVoid;xSrc, ySrc, dxSrc, dySrc: Integer;wFlags: Word): WordBool; external 'MSVideo';
function  DrawDIBUpdate(hDD: HDrawDIB; hbmpDC: HDC;xDst, yDst: Integer): WordBool; external 'MSVideo';
function  DrawDIBEnd(hDD: HDrawDIB): WordBool; external 'MSVideo';
function  DrawDIBTime(hDD: HDrawDIB; pDDTime: PDrawDIBTime): WordBool;external 'MSVideo';
function  DrawDIBProfileDisplay(pbmpInfo: PBitmapInfoHeader): DWord;external 'MSVideo';
end.
0
 
LVL 17

Expert Comment

by:inthe
ID: 1345486
B.T.W the functions are documented in mm.hlp

InThe
0
 
LVL 3

Author Comment

by:Matvey
ID: 1345487
Hey, thanks, this looks promising! Do you have a sample how to use it? BTW where have you got this from?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:inthe
ID: 1345488
Hello Matvey
sorry for not getting back sooner i could'nt access ex-ex for 3 day's ???? and
sorry  i have never used this before but i will try to have a look soon and get back to you if i find anything :-)
InThe
0
 
LVL 3

Author Comment

by:Matvey
ID: 1345489
Sure, thanks. Please tell me when you got something...
0
 
LVL 3

Author Comment

by:Matvey
ID: 1345490
Oh I beg your pardon. I alwais forget about my questions! Please go ahead and receive the points! Very thankful, and alwais glad to see you ;-)

Can I ask you again where you got this source from? I'm kinda searching for these places, you know...
0
 
LVL 17

Accepted Solution

by:
inthe earned 600 total points
ID: 1345491
hello matvey
cheers for points.
i dont know where i got drawdib.pas from i save everything like pas files on the web when i find them and was just lucky to have it .i find one of the best places to find stuff in on dejanews or even newsgroups i also goto a newish site called www.delphi32.com and awnser some questions there .
i have still been trying to find stuff on drawdib but i cant find anything good anywhere but dejanews has made my pas file collection grow :-)
good luck with it
Barry
0
 
LVL 3

Author Comment

by:Matvey
ID: 1345492
Hey I'm rich now, no problems with the points ;-)

Thanks again. I see that you deal with sound at your job, did I understand right? This isn't concerning my job, but I try to explore all kinds of audio. I'm very curious what exactly are you working on?
0
 
LVL 17

Expert Comment

by:inthe
ID: 1345493
hi again,  wow 600 did you win lottery :-)
im a electronic and mechanical engineer for a company that makes cd's (music and games )in the u.k. i get to play all the new games before they are released it's great.sometimes we have to develop machines that is where the programming interest came from. programming the machines is a good laugh but not as much fun as delphi eh.
cheers Barry
0
 
LVL 3

Author Comment

by:Matvey
ID: 1345494
That sounds good! I still haven't played NFS 3. Have you? This is my kind of a job ;-)

Do you actually write any sound software? I try a bit myself, but I'm not specialized in it. I wonder if you could give me some advice sometimes, if you don't mind of course? I'd be very very thankful. Right now one friend and I try to write some real-time processing, and I wonder if you had something to do with it anyhow? This would be just great, because very few people wanted to help me with this.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question