Re: [android-developers] Path, PathShape problem

2011-03-12 Thread Romain Guy
You need to call setBounds() on the Drawable at least once before drawing it. On Sat, Mar 12, 2011 at 7:57 PM, Juan wrote: > Why doesn't this work? > > Path altRibbonPath = new Path(); > altRibbonPath.moveTo(0,0); > altRibbonPath.lineTo(100,100); > altRibbonScaleDrawable = new ShapeDrawable(new

[android-developers] Path, PathShape problem

2011-03-12 Thread Juan
Why doesn't this work? Path altRibbonPath = new Path(); altRibbonPath.moveTo(0,0); altRibbonPath.lineTo(100,100); altRibbonScaleDrawable = new ShapeDrawable(new PathShape(altRibbonPath,metrics.widthPixels,metrics.heightPixels)); altRibbonScaleDrawable.getPaint().setColor(Color.WHITE); altRibbonSca