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.82 MB
Time: 0.04 c
1-22206
T2
2001-12-16 07:11
2002.01.08
Align field


3-21910
Wladimir
2001-12-04 08:01
2002.01.08
Number of entries in the table?


1-22050
Russian
2001-12-18 17:03
2002.01.08
WELL VERY INTERESTING QUESTION :))))


1-22032
Socol
2001-12-18 10:01
2002.01.08
Монипуляция чисел.


14-22317
Tosov
2001-10-31 23:58
2002.01.08
Delphi 6





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 spanish 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