Page 1 of 1
					
				Problem with printing resized image
				Posted: Thu Oct 02, 2008 8:37 am
				by prosoft
				I insert image from clipboard to document. (printscreen 1024x800). I change this size to 100x100 pixels by property page. Image is showen right. Now I do print document and image is printed with height 100 px but width is original (1024 pix).
Thanks Josef.
			 
			
					
				
				Posted: Thu Oct 02, 2008 6:18 pm
				by Sergey Tkachenko
				This problem will be fixed in the next TRichView update.
If you have TRichView source code, this is a quick fix:
Open CRVFData.pas, and change the procedure PaintAsBitmap:
Code: Select all
  procedure PaintAsBitmap(X, Y: Integer; DrawItem: TRVDrawLineInfo;
    Item: TCustomRVItemInfo);
  var bmp: TBitmap;
  begin
    bmp := TBitmap.Create;
    try
      bmp.Width := Item.GetImageWidth(RVStyle);
      bmp.Height := Item.GetImageHeight(RVStyle);
      Item.PrintToBitmap(bmp, False, GetParentControl as TCustomRichView, DrawItem,
        -1, rvcmColor);
      RV_PictureToDevice(Canvas, X+Item.GetBorderWidth, Y+Item.GetBorderHeight,
        Item.GetImageWidth(RVStyle), Item.GetImageHeight(RVStyle), nil, bmp, False);
    finally
      bmp.Free;
    end;
  end;