我正在寻找一个使用多个位图(类似于网格图案)构建画布的示例。
我是否需要创建一个将所有其他位图放在顶部的单个位图,或者我可以将每个位图“放入”画布中(类似于连接字符串)?
注意:我还将在此构建的画布上放置其他图像(可能是其他位图),这会导致任何其他问题,还是我可以将这些图像直接添加到顶部?
I am looking for an example for constructing a canvas with multiple bitmaps(kind of in a grid pattern).
would I need to create a single bitmap that holds all of the other bitmaps on top or can I just place each bitmap "into" the canvas (similar to concatenating a string)?
note: that I will also be placing additional images ontop of this constructed canvas (probably other bitmaps) would this cause any additional issues, or can I just add those right on-top?
发布评论
评论(1)
您可以使用
onDraw(Canvas canvas)
方法来使用 drawBitmap(...) 方法集合来绘制所需的网格。 “http://developer.android.com/reference/android/graphics/Canvas.html”rel="nofollow">Canvas 类。编辑:这样你就必须处理 z 顺序和所有定位
You can possibly have an View with the
onDraw(Canvas canvas)
method drawing the grid you want using thedrawBitmap(...)
collection of methods of the Canvas class.EDIT: This way you have to deal with z-order and all the positioning of course