开发者

How to create simple paint program with zoom

I'm new to Android and Java programming and I'v开发者_如何学Pythone manage to create a simple paint program, but how do I add a zoom feature? Right now I'm just extending the View class and using the "onDraw()" method.

Do I have to use a Drawable to be able to add zooming functionality? I'm not really understanding the differences between the two.

If I am way off base then please point me to a good tutorial on paint/zooming.


I think your question is beyond the scope that stackoverflow Q/A format can provide. I know you're asking for 'simple' but imho that's probably due to your lack of perception about the scope of the question that you're asking.

In order to support zooming you need to know what kind of image processing engine you want. Are you creating a vector or raster based drawing program? If you do not understand the difference between the two then you'll going to have a difficult time figuring out what to do.

You should probably at least gain a basic understanding about these various topics (links to books pulled more or less from the top of amazon's search results):

  • Image Processing
  • Computer Graphics Fundamentals, two, and three
  • SVG (vector graphic format)

Wikipedia links:

  • Vector Graphics
  • Raster Graphics
  • Image Processing

Open source image processing apps (not android but source code never hurts to see how others have done something)

  • Paint.net
  • GIMP
  • Inkscape

I'm sorry there isn't an easy and direct answer to your question. I'm also not saying that you need to become an expert in these topics to do what you want. You just need to familiarize yourself with them and then you'll probably be able to implement what you want without much difficulty.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜