jmpessoa / lazandroidmodulewizard

LAMW: Lazarus Android Module Wizard: Form Designer and Components development model!
247 stars 82 forks source link

Width and Height properties of jBitmap allways return zero #411

Open guaracy opened 2 years ago

guaracy commented 2 years ago

To work here, I Included functions GetWidth and GetHeight.
I changed the jBitmap class code as follow:

jBitmap = class(jControl)
  .....
  protected
    function GetWidth(): integer;
    function GetHeight(): integer;
  .....
  published
    property Width:  integer read GetWidth  write FWidth;
    property Height: integer read GetHeight write FHeight;
  .....

function jBitmap.GetWidth(): integer;
begin
  //in designing component state: result value here...
  if FInitialized then
   Result:= jni_func_out_i(FjEnv, FjObject, 'GetWidth');
end;

function jBitmap.GetHeight(): integer;
begin
  //in designing component state: result value here...
  if FInitialized then
   Result:= jni_func_out_i(FjEnv, FjObject, 'GetHeight');
end;