Thread: Rendering Image with StretchRect

  1. #1
    Samuel shiju's Avatar
    Join Date
    Dec 2003

    Rendering Image with StretchRect

    I am trying to render a bitmap through DirectX StretchRect. The image contains 18 * 17 (32 pixel) tiles. This image is for a tetris clone. The main game area has Vertical and Horizontal lines. The problem is while rendering on the screen the image is not comming up as the orignal bitmap one of the vertical file is missing and a Horizontal line is thicker then the orignal bitmap.

    I have attached the code and images. here
    Be conservative in what you do, be liberal in what you accept from others.
    RFC 793, "Transmission Control Protocol."

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    StretchRect does not render the image. It is a simple BitBlt with stretching functionality, given your card supports the operation.

    Your description of the problem does not make sense. What is a vertical file? Why are you using StretchRect for a tetris game? Why are you downsampling it so much.

    If you are downsampling and then copying back to the back buffer to present...of course it will not have the same resolution as the original.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Replies: 1
    Last Post: 05-27-2009, 12:46 PM
  3. Simple Image Processing
    By ejohns85 in forum C++ Programming
    Replies: 4
    Last Post: 03-19-2009, 12:10 PM
  4. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 12:46 PM
  5. Replies: 4
    Last Post: 03-02-2003, 09:12 AM