Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Picture to printer Find similar branches


hunter   (2001-12-17 13:17) [0]

Как осуществить сабж, но так чтобы правильно ее поместить на А4 в независимости от размера картинки.
Картинка есть-лист формати А4, но в каком разрешении не известно.



Sergey_n   (2001-12-18 00:06) [1]

В Borland C++ Builder вроде так
if ( PrintDialog1->Execute() ){
unsigned int BitmapInfoSize, BitmapImageSize;
long DIBWidth, DIBHeight;
PChar BitmapImage;
Windows::PBitmapInfo BitmapInfo;
Graphics::TBitmap *Bitmap;

Printer()->BeginDoc();
Bitmap = new Graphics::TBitmap();
Bitmap->Assign(Image3->Picture->Bitmap);
GetDIBSizes(Bitmap->Handle, BitmapInfoSize, BitmapImageSize);
BitmapInfo = (PBitmapInfo) new char[BitmapInfoSize];
BitmapImage = (PChar) new char [BitmapImageSize];
GetDIB(Bitmap->Handle, 0, BitmapInfo, BitmapImage);
DIBWidth = BitmapInfo->bmiHeader.biWidth;
DIBHeight = BitmapInfo->bmiHeader.biHeight;
StretchDIBits(Printer()->Canvas->Handle,
0, 0, DIBWidth, DIBHeight,
0, 0, DIBWidth, DIBHeight,
BitmapImage, BitmapInfo,
DIB_RGB_COLORS, SRCCOPY);
delete [] BitmapImage;
delete [] BitmapInfo;
delete Bitmap;

Printer()->EndDoc();
}

переделать на Delph думаю труда не составит.



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.81 MB
Time: 0.032 c
1-22089
HELP ME PLZ
2001-12-15 18:22
2002.01.08
Dll s


14-22393
Felix
2001-11-08 21:54
2002.01.08
What to do?


14-22374
nikols
2001-11-01 16:03
2002.01.08
How do programmers rest? And when?


3-21967
SklifF
2001-12-05 11:32
2002.01.08
about SQL


1-22113
Yuraz
2001-12-19 20:25
2002.01.08
Brothers why





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish