getDimensions question

So I've become quite adept at buffered bitmaps. Even using small segments of display and populating with segments from full display, etc. However, an easy thing I haven't figured out is how to use getDimensions to get height/width of my buffered bitmap variable. I know what it is and can copy/paste, but I only want to set it one time, and then when needed, just use getDimensions to get the size. I tried accessing it with Lang.Array.getDimensions(dateBuffer), dateBuffer:width, dateBuffer:width, etc., to no avail. Please help.
  • Former Member
    Former Member
    If I understand you correctly, you are trying to get the height and width of a buffered bitmap object you have?
    If so, I believe I have used the getDc() function before to get the dc associated with the bitmap, and then called getWidth() and getHeight() on that dc object.

    var buf = new Gfx.BufferedBitmap( ... );

    ...

    var w = buf.getDc().getWidth();
    var h = buf.getDc().getHeight();
  • If I understand you correctly, you are trying to get the height and width of a buffered bitmap object you have?
    If so, I believe I have used the getDc() function before to get the dc associated with the bitmap, and then called getWidth() and getHeight() on that dc object.

    var buf = new Gfx.BufferedBitmap( ... );

    ...

    var w = buf.getDc().getWidth();
    var h = buf.getDc().getHeight();


    That worked! Thank you. Much appreciated :)