Commit Graph

12 Commits

Author SHA1 Message Date
Hajime Hoshi
52b52e7d92 grpahics: Move DrawImage implementation to mipmap and remove (*mipmap).original() 2019-09-19 11:25:33 +09:00
Hajime Hoshi
e585fda253 grpahics: Move DrawTriangles implementation to mipmap 2019-09-19 11:15:14 +09:00
Hajime Hoshi
504a433540 graphics: Reduce original() usage 2019-09-19 02:27:20 +09:00
Hajime Hoshi
95bc445fea graphics: Refactoring: Remove imports 2019-09-19 02:17:35 +09:00
Hajime Hoshi
b8eeded538 graphics: Remove 'resetRestoringState'
This is basically a revert of 2d079b123f

As filling can happen on a part of a shared image, resetting the
restoring state was wrong.
2019-08-25 02:18:51 +09:00
Hajime Hoshi
2003b7d292 Fix misspellings 2019-08-01 01:07:23 +09:00
Hajime Hoshi
e434869dd7 graphics: More precise enlarging
Before this change, enlarging a 1px image with x4095 scale was not
accurate and edges were missing. This change fixes this issue.

Updates #611
2019-07-31 22:02:39 +09:00
Hajime Hoshi
ab0a6f4ff7 graphics: Fix small issues in mipmap
* Create images for negative mipmap from its next image so that
  the scale is not too big.
* Some variables usages were not correct.
2019-07-31 09:20:57 +09:00
Hajime Hoshi
b210339786 graphics: Use 'negative' mipmap when enlarging a too small image
This is a hack to render edges correctly.

This works only when the filter is nearest.

Fixes #611
2019-07-30 23:03:55 +09:00
Hajime Hoshi
69ef9eb184 graphics: Refactoring: Use map in mipmap 2019-07-30 19:43:50 +09:00
Hajime Hoshi
2d079b123f restorable: Add ResetRestoringState to reset the state
After Fill command, the image doesn't have to keep the restoring
information. Now Fill command is as same as DrawTriangles, there
is no way for restorable.Image to know whether it can reset the
state or not. ResetRestoringState clears the state explicitly.
2019-07-20 14:04:02 +09:00
Hajime Hoshi
e499535728 graphics: Move functions to the package ebiten 2019-06-26 22:23:09 +09:00