Results 1 to 3 of 3

Thread: Method to get Sprite-Pixel?

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171

    Method to get Sprite-Pixel?

    Is there a method to retrieve color of a pixel on sprites?
    Last edited by ReneMiner; 19-11-2012 at 15:30.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159
    I will make the assumption the sprite has been drawn on the screen and you know the width/height and x,y position of the sprite ??

    TBGL_GetPixelInfo( x, y, %TBGL_PINFO_RGB, R, G, B )
    
    ' Fills passed variables with requested values to obtain x,y,z position or RGB color from 3D world
    ' Make sure you call this command after the geometry is rendered, else you can get "false positives"
    
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    very good. I thought this would just retrieve colors of 3d-coords or even the coords in space and tried GetPixel lib "Gdi32" before.
    but this starts X,Y outside the client-area at the real top left-corner of window
    - that was a problem - but

    ...not any more
    Thank you for pitching my nose down on that
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. Get Pixel Color from a Picture
    By zak in forum UI (User Interface)
    Replies: 3
    Last Post: 09-03-2011, 17:07
  2. volumetric pixel art (for mr. blank)
    By Lionheart008 in forum TBGL General
    Replies: 4
    Last Post: 23-11-2010, 00:50
  3. Improved donations method
    By ErosOlmi in forum Web and Forum
    Replies: 3
    Last Post: 03-12-2008, 18:40

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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