Recent

Author Topic: jView : how to ?  (Read 11601 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: jView : how to ?
« Reply #15 on: May 19, 2016, 10:41:06 pm »

Hi tintinux!

Quote
... but I'd like to save the drawing in memory to be able to restore it partially later.

Please, wait. I wil do some improvement in jView even today...

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

tintinux

  • Sr. Member
  • ****
  • Posts: 378
    • Gestinux
Re: jView : how to ?
« Reply #16 on: May 20, 2016, 03:34:52 pm »
Ok, I'm waiting   8)

I have another question with jView :

When I call jView.Invalidate  the OnDraw event is not called, except the first time.

I found this hint but I don't find how to call the method
Code: Pascal  [Select][+][-]
  1. setWillNotDraw(false)
from my code.  Maybe a public property should be made available (and it could be probably TRUE by default).

Best regards
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: jView : how to ?
« Reply #17 on: May 20, 2016, 07:55:07 pm »

Hi tintinux!

Quote
in...validate  the OnDraw event is not called, except the first time.

Ok. I will take care of it too ... and others [pm] issues....

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

tintinux

  • Sr. Member
  • ****
  • Posts: 378
    • Gestinux
Re: jView : how to ?
« Reply #18 on: May 27, 2016, 05:42:49 pm »
Hi

The new jDrawingView is simpler to use, and I can now obtain what I want !

I have however some questions and remarks :

1) Why is Canvas a parameter of the OnDraw event ?
Nothing happens when we draw on this Canvas, we have to draw on the View only.
It could sometimes be useful to have the Canvas of the View, but it could be obtained by something like :
Code: Pascal  [Select][+][-]
  1. TjDrawingView(Sender).Canvas
  if the property Canvas was existing.
I think there is no need for a parameter, which will give most times a "unused parameter" Hint.

2) The method JDrawingView.Invalidate exists, but it seems it does nothing. Refresh does the job.
You could call Refresh from Invalidate, because it works like this, I believe, in LCL.
Or else make Invalidate private or deprecated.

Best regards

Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

 

TinyPortal © 2005-2018