Skip to content

Conversation

@rutan
Copy link
Contributor

@rutan rutan commented Aug 11, 2018

Bitmap#drawSmallText has 2 problems 😭


(1)
bitmap.width is read only property.
so, bitmap.width *= 2 is not working.

/**
* [read-only] The width of the bitmap.
*
* @property width
* @type Number
*/
Object.defineProperty(Bitmap.prototype, 'width', {
get: function() {
if(this.isReady()){
return this._image? this._image.width: this._canvas.width;
}
return 0;
},
configurable: true
});

(2)
Bitmap#drawSmallText cannot drawn outline (Bitmap#outlineWidth) or descender alphabet (ex. g, j, p ...)... 😱


I try fix these issues.
Please check this PR 🙏

preview

@rutan rutan force-pushed the fix/draw_small_text branch from e76ca67 to fd90ddd Compare August 12, 2018 12:55
Copy link
Collaborator

@krmbn0576 krmbn0576 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🍣

Copy link
Contributor

@Sigureya Sigureya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK!

@krmbn0576 krmbn0576 merged commit b2c3160 into rpgtkoolmv:master Aug 16, 2018
@rutan rutan deleted the fix/draw_small_text branch August 19, 2018 09:38
@rutan
Copy link
Contributor Author

rutan commented Aug 19, 2018

😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants