adisonx

Thailand
29 Posts |
Posted - Jan 26 2015 : 22:29:30
|
I want to print the area of image ,but I get "floating point invalid operation at 0x00a0fa06" error and here is my code.
if (this->ImageEnView->Selected) {
if (this->PrintDialog->Execute()) { TImageEnIO* ImageEnIO = new TImageEnIO(this); Printer()->Copies = this->PrintDialog->Copies; TMemoryStream* mem = new TMemoryStream(); this->ImageEnView->SaveSelectionToStream(mem); //save area to temporary stream mem->Position = 0; Printer()->BeginDoc(); ImageEnIO->LoadFromStream(mem); ImageEnIO->PrintImage(Printer()->Canvas, 0, 0, 0, 0, ievpTop, iehpLeft, iesNormal, 0, 0, 1); Printer()->EndDoc();
delete mem; delete ImageEnIO; }
}
What 's wrong with my code and how do I fix this. Thank you in advance.
---Update My mistake SaveSelectionToStream method is only save the selection not image content,but how do I get image area content. |
|