move more code to Graphics
This commit is contained in:
parent
73872ebb6f
commit
1605fdfc99
2 changed files with 27 additions and 21 deletions
|
|
@ -212,6 +212,16 @@ function mapBitmapToAdapter(
|
|||
}
|
||||
}
|
||||
|
||||
function drawBitmap(adapter, bitmap, pos) {
|
||||
const rect = bitmap.getBoundingRect()
|
||||
mapBitmapToAdapter(
|
||||
bitmap,
|
||||
rect,
|
||||
adapter,
|
||||
rect.moved(pos.x, pos.y)
|
||||
)
|
||||
}
|
||||
|
||||
export default {
|
||||
createCanvas,
|
||||
dataToBitmap,
|
||||
|
|
@ -225,4 +235,5 @@ export default {
|
|||
fillBitmapCapped,
|
||||
mapBitmapToAdapter,
|
||||
mapBitmapToAdapterCapped,
|
||||
drawBitmap,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue