title: VectorDrawableCompat and Canvas rotate, drawable disappears at 90/270 degrees
body: <p>I'm trying to use vector drawables to draw into canvas. Everything is fine and dandy till I rotate the canvas object by 90 or 270 degrees. Closer I get to 90 or 270 degrees, more blurry the drawable shown in canvas appears. Finally at 90 or 270 degrees, the vector drawable on canvas disappears completely. Is there some sort of fix or workaround for this? Or should I approach drawing into canvas with svg's with some other library? Thanks!</p>
  
  <p>Here's the code:</p>
  
  <pre><code>public class CanvasView extends View {
  
  private static final String TAG = "CanvasView";
  
  private VectorDrawableCompat vectorDrawableCompat;
  private int angle;
  
  public CanvasView(Context context) {
      super(context);
      init();
  }
  
  public CanvasView(Context context, AttributeSet attrs) {
      super(context, attrs);
      init();
  }
  
  public CanvasView(Context context, AttributeSet attrs, int defStyleAttr) {
      super(context, attrs, defStyleAttr);
      init();
  }
  
  private void init(){
      vectorDrawableCompat = VectorDrawableCompat.create(getResources(),
              R.drawable.ic_android_black_24dp, null);
  }
  
  @Override
  protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
      super.onMeasure(widthMeasureSpec, heightMeasureSpec);
      vectorDrawableCompat.setBounds((getWidth()/2) - 50, (getHeight()/2) - 50, (getWidth()/2) + 50, (getHeight()/2) + 50);
  }
  
  @Override
  protected void onDraw(Canvas canvas) {
      super.onDraw(canvas);
      canvas.save();
      canvas.rotate(angle, getWidth()/2, getHeight()/2);
      vectorDrawableCompat.draw(canvas);
      canvas.restore();
  }
  
  public void setAngle(int angle){
      Log.i(TAG, "setAngle: " + angle);
      this.angle = angle;
      invalidate();
  }
  }
  </code></pre>
  
  <p>Here's the project: <a href="https://github.com/danskiess/VectorTest" rel="noreferrer">https://github.com/danskiess/VectorTest</a></p>