Tile background bitmap for GoView


#1

How to easily assign tile background bitmap for GoView?

view.BackgroundImage = Bitmap.FromFile(…) draws little image at upper left corner only (not tiled).


#2

You’ll need to override GoView.PaintBackgroundDecoration to do the tiling yourself. You’ll want to minimize the number of calls to DrawImage you make, based on the clipRect argument. Remember that the Graphics has been transformed to be in document coordinates, not view (pixel) coordinates. Also if you really do tile everywhere, you could override PaintPaperColor to be a no-op.