Results 1 to 3 of 3

Thread: Bitmaps

  1. #1
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default Bitmaps

    I'm writing a tutorial about drawing on screen. To show some different techniques I need to all about bitmaps and I still got some problems with that.

    A bitmap as Integer
    • Probably loaded into the memory somewhere, I only get the number.
    • Can create a TMufasaBitmap out of it by GetMufasaBitmap.
    • It has no drawing canvas property I can access.


    A bitmap as TBitmap
    • I got a canvas.
    • I can't draw it on another canvas/bitmap.
    • Can't create any othere type of bitmap out of it.


    A bitmap as TMufasaBitmap
    • Got no canvas.
    • Can create a TBitmap out of it.
    • Can get it back as integer if it was created as integer.
    • Can be drawn on a canvas.


    I need a bitmap(or 2 which can be exchanged)
    • With a canvas.
    • Can be drawn on another canvas.


    edit: before I forget and someone spends hours on this. This will be probably be solved with a fix to simba.
    Last edited by masterBB; 10-14-2011 at 11:24 AM.
    Working on: Tithe Farmer

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    As of this (https://www.moparisthebest.com/jenki...ext/lastBuild/) Simba-next, the following works now:

    Simba Code:
    program new;
    var
        m: TMufasaBitmap;
        b: TBitmap;
    begin
        b := TBitmap.Create;
        b.Width := 42;
        b.Height := 42;
        m := TMufasaBitmap.Create;
        m.LoadFromTBitmap(b); // And don't forget you also have ToTBitmap. :)
        writeln(m.Width);
        b.Free;
        m.Free;
    end.
    Last edited by Wizzup?; 10-14-2011 at 03:11 PM.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    You're my hero!
    Working on: Tithe Farmer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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