Skip to content

Commit

Permalink
fix up namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Oct 9, 2024
1 parent 009b6e8 commit 6b74ded
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions libs/bitmap/_locales/bitmap-jsdoc-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"Bitmap.setRows": "Copy row(s) of pixel from buffer to bitmap.",
"Bitmap.transposed": "Returns a transposed bitmap (with X/Y swapped)",
"Bitmap.width": "Get the width of the bitmap",
"bitmap.create": "Create new empty (transparent) bitmap",
"bitmap.doubledIcon": "Double the size of an icon",
"bitmap.ofBuffer": "Create new bitmap with given content",
"bitmaps.create": "Create new empty (transparent) bitmap",
"bitmaps.doubledIcon": "Double the size of an icon",
"bitmaps.ofBuffer": "Create new bitmap with given content",
"helpers.imageRotated": "Returns an image rotated by 90, 180, 270 deg clockwise"
}
3 changes: 2 additions & 1 deletion libs/bitmap/_locales/bitmap-strings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"bitmap|block": "bitmap",
"bitmaps|block": "bitmaps",
"helpers|block": "helpers",
"{id:category}Bitmap": "Bitmap",
"{id:category}Bitmaps": "Bitmaps",
"{id:category}Helpers": "Helpers"
}
2 changes: 1 addition & 1 deletion libs/bitmap/bitmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace bitmaps {
w = Math.max(img.width, w)
h += img.height
}
let r = bitmap.create(w, h)
let r = bitmaps.create(w, h)
let y = 0
for (let img of images) {
let x = (w - img.width) >> 1
Expand Down
8 changes: 4 additions & 4 deletions libs/bitmap/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,24 @@ declare interface Bitmap {
//% shim=BitmapMethods::overlapsWith
overlapsWith(other: Bitmap, x: int32, y: int32): boolean;
}
declare namespace bitmap {
declare namespace bitmaps {

/**
* Create new bitmap with given content
*/
//% shim=bitmap::ofBuffer
//% shim=bitmaps::ofBuffer
function ofBuffer(buf: Buffer): Bitmap;

/**
* Create new empty (transparent) bitmap
*/
//% shim=bitmap::create
//% shim=bitmaps::create
function create(width: int32, height: int32): Bitmap;

/**
* Double the size of an icon
*/
//% shim=bitmap::doubledIcon
//% shim=bitmaps::doubledIcon
function doubledIcon(icon: Buffer): Buffer;
}

Expand Down

0 comments on commit 6b74ded

Please sign in to comment.