Math

result of function getResultAsImage().

Hi i got a question about function getResultAsImage().
for example. I write a+b with smaller charactor on the MathWidget. and then write the same a+b with a bigger charactor.The result of getResultAsImage() is a smaller bitmap and a bigger bitmap.

I want to mixed the bitmap and other text together. so is there a way to specify a specific size of the output bitmap?for example set the input text size 18dp or 20dp. Thanks.


Dear Weilai,

thank you for contacting us.

Indeed, when calling the getResultAsImage(), we return with a BMP file of the result. We do not provide with any way to customize it. Nevertheless, as a BMP file, you can use many libraries to customize it according to your needs. We do not recommend any specific library.

Best regards,

Olivier

Thank you. My question is the same with below.
https://developer-support.myscript.com/support/discussions/topics/16000007861

I want to customize the size of text. and then the sizee of output image.

can you give me the user kai zhang 's mail? I want to contact him .Thank you.

Dear Weilai,

we are currently not entitled to provide you with the email of the person.

Did you try using the setPaddingRatio function?

Did you also try to proceed as indicated in the link https://developer-support.myscript.com/support/discussions/topics/16000007827

Best regards,

Olivier

Thank you for your answer . I have try the setPaddingRatio function. for bigger input it can works well.
but if user input is small. the output will be more smaller... We can't control the size user input.
I think setPaddingRatio is like to scale?Is it right?

Dear Shi Tijun,

we have actually think of another solution to your problem:
-You could give a try using the getResultAsLaTeX function
-With the Latex result, you could render it using the libary you prefer, and re-size the result as you prefer
-You can then add it to any text you prefer

Otherwise, maybe you could give a try to the getResultAsText function?

Let us know if this helps.

Best regards,

Olivier

Login or Signup to post a comment