Getting part of bitmap from TRVCustomPrint only
Posted: Mon Jan 28, 2008 5:16 am
Sergey, I've got one question.
In my project I need to get a part of bitmap preview in scale size.
Could you help me and tell, how to modify a part of MakePreview to work with big size images?
I need smth like:
MakePartPreview(PageNo: Integer; Height, Width: Intger; PartRect: TRect; destBmp: TBitmap)
I've used MakeScaledPreview - but for big bitmaps I've got "Out of memory exception". I understand, that the whole bitmap wouldn't used anyway, but I've really puzzled, how to make source work right. Maybe I didn't used cliping and view areas right - but I've got no ideas about that
In prototype function, Height and Width defines true size of needed bitmap for outputing, PartRect defines rectangle, which needed to cut into destination bitmap in this true scaling.
I think, that this function could be very useful for all of users of TRichView product.
Best regards,
Michael.
In my project I need to get a part of bitmap preview in scale size.
Could you help me and tell, how to modify a part of MakePreview to work with big size images?
I need smth like:
MakePartPreview(PageNo: Integer; Height, Width: Intger; PartRect: TRect; destBmp: TBitmap)
I've used MakeScaledPreview - but for big bitmaps I've got "Out of memory exception". I understand, that the whole bitmap wouldn't used anyway, but I've really puzzled, how to make source work right. Maybe I didn't used cliping and view areas right - but I've got no ideas about that

In prototype function, Height and Width defines true size of needed bitmap for outputing, PartRect defines rectangle, which needed to cut into destination bitmap in this true scaling.
I think, that this function could be very useful for all of users of TRichView product.
Best regards,
Michael.