Results 1 to 2 of 2

Thread: tiling effect in DirectDraw

  1. #1
    Guest
    A few questions concerning DirectDraw:

    I'm trying to make a tiling effect - use bitmaps of a certain size to fill up the whole screen. What is the best way to approach this?

    1) Is it possible to display multiple bitmaps on one surface? If so, how?

    2) Is it possible to make the top-left corner of a surface in full-screen mode be anything other than (0,0)?

    Thanks for any suggestions.

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    1) Try looking into BitBlt to copy a single bitmap multiple times, through some manipulations.

    2) You can use a user-defined scale:
    eg.
    Scale (-500, 200) - (500, -200)

    The first co-ordinates are what the base of the top-left corner of the screen will be, the second co-ordinates being for the lower-right corner of the screen.Also, using this method sets the ScaleMode to vbUser. Now if you wanted to place a control on the form in the very top left corner you would set its properties to the following:

    Text1.Left = -500
    Text1.Top = 200


    Hope it's helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width