Math

setInkColor(Color.TRANSPARENT)

Hello,

I tried to set the ink color transparent by followings.

mWidget.setInkColor(Color.TRANSPARENT);

But it does not seem to work properly. The ink color becomes black.

How can I make it transparent?

Thanks.



Dear HK Kim,


thank you for your post.


This is currently an issue in the MathWidget. At present, we have no workaround to propose.


An issue has been submitted internally, so that it may be solved in a future release of the application.


Best regards,


Olivier

Hi HK Kim,


Could you please tell me more about the use case for transparent ink in the canvas?

Would it be a way to hide/show parts of the content of the widget programmatically?


Thank you,

Fabien

Dear Olivier,

Thank you for your kind advice.

I hope this issue will be solved soon if possible, because this is very important for us.

In addition, I also hope to use thin thickness of ink by following method.

mMathWidget.setInkThickness(0.1);   // for thin ink

or 

mMathWidget.setInkThickness(0);  // for transparent ink


Thanks.

Best regards,

Kim


Hi,

I am sorry for my late comment for your last reply.

Although there are addStroke API in mathwidget and single line text widget, I cannot use it in mathwidget.

I use android studio and these seems to be no such method in mathwidget.

In case of text widget, it works well.

Please inform your advice.

Thanks.

Kim



Dear HK Kim,


I confirm we also have the AddStroke function in the mathWidet API. Can you confirm you are using the latest ATK 2.2 available on our developer portal:

 

void addStroke(List<com.myscript.atk.core.CaptureInfo> points)

Adds a stroke to the MyScript document model.

Parameters:points - Points of the stroke.
 struct CaptureInfo
 {
 float x;   // x coordinate
 float y;   // y coordinate
 float f;   // f pressure
 float w;   // w width
 int64_t t; // t timestamp (millisecond)
 };
 


Best regards,


Olivier

Hi Fabien,

Thank you for your interest in my old post.

In some cases, we use stylus pen with its own drawing program and in the same time make the strokes recognized by math widget.

In that cases, the drawing of strokes are duplicated so I hope the ink of widget to be invisible.

I hope this explanation will be enough.

Thanks.

HK Kim



Hi,


We have an API called AddStroke which you can use to put strokes in the Math Widget and recognize them programmatically.

Another workaround would be to set both the background of the widget and the ink to the same color.

I hope this helps.


Best regards,

Fabien

Dear Olivier,


Thank you for your advice always.


I changed the minSdkVersion from 14 to 15 as in the Myscript sample application 

and the addStroke method appeared!


Thanks a lot!


HK Kim

Dear HK Kim,

I am glad it is working.

Best regards,

Olivier

Dear HK Kim,


I just submitted a feature to be able to set ink thickness to zero.


Regarding the issue and feature, at present I can not tell if/when it will be fixed.


Best regards,


Olivier

Dear Olivier,

Thank you very much for your follow-ups.

Best regards,

Kim


Login or Signup to post a comment