How to Draw Arrowline in android.graphics.Path with correct configerations -


Whatever I've tried:

I want to display it Trying Arrow line with the following code

  path mArrowPath = new paint () ;; MArrowPath.rewind (); MArrowPath.moveTo (0, mHeight / 2); MArrowPath.lineTo (mWidth / 2, 0); MArrowPath.lineTo (mWidth, mHeight / 2); MArrowPath.lineTo (mWidth * 3/4, mHeight / 2); MArrowPath.lineTo (mWidth * 3/4, mHeight); MArrowPath.lineTo (mWidth / 4, mHeight); MArrowPath.lineTo (mWidth / 4, mHeight / 2); MArrowPath.lineTo (0, MHIGH / 2); Size pathshap = new pathshap (mArrowP, maxWidth, maxHeight); Size Drawnable Size D = New Size Drainage (Pathshap); ShapeD.draw (canvas); // Display it in onraw (canvas canvas)   

I got the following result

 Enter image details here

Problem:

I can not find the expected results, the following Failed to understand / find the path configuration parameter to display the result! I failed to increase the size of length , width arrow line.

Expected Result:

Image Here Enter details

Any help will be grateful!

You can use the canvas.ronnet () method to rotate the arrow

or

  path mArrowPath = new paint () ;; MArrowPath.rewind (); MArrowPath.moveTo (mWidth, mHeight / 2); MArrowPath.lineTo (mWidth / 2, mHeight); MArrowPath.lineTo (mWidth / 2, mHeight * 3/4); MArrowPath.lineTo (0, Amhit * 3/4); MArrowPath.lineTo (0, MHIGH / 4); MArrowPath.lineTo (mWidth / 2, mHeight / 4); MArrowPath.lineTo (mWidth / 2,0); MArrowPath.lineTo (mWidth, mHeight / 2); Size pathshap = new pathshap (mArrowP, maxWidth, maxHeight); Size Drawnable Size D = New Size Drainage (Pathshap); ShapeD.draw (canvas);    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

C++ Array Type Not Assignable in Copy Constructor -