Friday, August 5, 2011

[android-developers] Re: Drawing a smooth curve that connects 10 points in my bitmap

great suggestion, thanks niki, will try this and post on results !

On Aug 5, 12:03 pm, niko20 <nikolatesl...@yahoo.com> wrote:
> You could increase the number of points just before actually drawing
> by first doing a cubic interpolation. A "lineTo" is a linear
> interpolation which is not what you want. A cubic interpolation will
> give you more of a curve shape. So take your ten points, and
> interpolate extra points between each of those, and then once you have
> enough points, then pass that to lineTo(). It will still draw straight
> lines but they will be smoothed out from having more data points to
> work with.
>
> -niko
>
> On Aug 5, 8:01 am, androidmediadeveloper <kamathaj...@gmail.com>
> wrote:
>
> > I have a bitmap that I draw on at runtime, and I basically come up
> > with 10 points on the bitmap that I'd like to see connected with one
> > smooth curve. Using the Path.lineTo to draw individual lines now which
> > are obviously individual sharp lines connecting 2 successive points.
> > Any good ideas for drawing up one smooth flowing line ? Tried the
> > Path.cubicTo which draws a bezier given 3 control points but this
> > doesnt seem to have the desired effect.
>
> > Thanks

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment