Results 1 to 10 of 21

Thread: Usage of clipboard-data as Texture

Threaded View

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

    Usage of clipboard-data as Texture

    it's just an idea, maybe can be done somehow but I dunno how because I have no idea what format is used to store graphics on clipboard.

    thinCore allows only to capture a text from clipboard - but thinCore is not a graphics-module.

    My idea is to have a TBGL-function that creates a texture from some image-data currently to find on clipboard, very simple, perhaps alike this

    Function TBGL_TextureFromClipboard( 
                        Byval texID as Long, 
                        Byval TBGL_TEX_Quality as Long, 
               Optional Byval lWidth as Long, 
                        Byval lHeight as Long
           ) As Long
    
    ' return ID of texture on success
    ' return 0 if no data found on clipboard/ if function failed
    ' ---
    
    ' maybe:
    
    %Size_POT = -1   ' size automatic to the nearest power-of-two 
    %Size_None = 0   ' leave size as is 
    
    TBGL_TextureFromClipboard( texID, %TBGL_TEX_CRISPANISO, %Size_POT, %Size_POT )
    
    
    ' --
    ' perhaps also have a reverse operation:
    
    Function TBGL_TextureToClipboard( texID ) As Long
    ' return True if success
    ' return False if slot texID was empty
    
    so basically one passes just the texture-slot, desired width & height and desired quality to create a texture from image-data on clipboard.
    If Width and Height are passed and are above 0 then this would be the desired texure-size,
    else the function should use either the next matching POT for Width, Height or both if below 0 and fill the leftover pixels with black on %TBGL_Data_RGB (24bit) or transparent on %TBGL_Data... that contains an alpha (32bit) or just leave the size unchanged if 0/None passed.
    Last edited by ReneMiner; 19-06-2014 at 08:46.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. getting info from the clipboard
    By stapper in forum UI (User Interface)
    Replies: 4
    Last Post: 08-08-2011, 20:23
  2. Data trigger and data events
    By ErosOlmi in forum TBEM module - thinBasic Event Manager module
    Replies: 9
    Last Post: 10-10-2008, 22:54
  3. How to put Down Arrow into clipboard
    By jbellies in forum OS
    Replies: 11
    Last Post: 23-10-2007, 19:54
  4. NEW ThinAIR utility (TBCode to Clipboard)
    By RobertoBianchi in forum thinAir General
    Replies: 2
    Last Post: 31-05-2006, 14:19

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
  •