Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawClippedImage が正常に動いていない #21

Closed
seibe opened this issue Jan 8, 2017 · 1 comment
Closed

DrawClippedImage が正常に動いていない #21

seibe opened this issue Jan 8, 2017 · 1 comment
Assignees
Milestone

Comments

@seibe
Copy link
Member

seibe commented Jan 8, 2017

本日中に直す

各引数(top ~ left)に色々値を入れて試してみた結果、切り取られ方は以下のようになりました。

(1) top : left & bottom (top)
(2) right : left (right)
(3) bottom : left (top)
(4) left : left > right (left < right)

それぞれ、切り取られる方向がずれているようです
括弧内は、ある程度値が大きくなった場合(画像サイズの半分程度?)に、追加で切り取られる方向です
(4)については、leftとrightの両方から切り取られ、値の大きさによって切り取られる比率が変わるという意味です

@seibe
Copy link
Member Author

seibe commented Jan 9, 2017

#28 とは別件で、まだバグが残っていた。1094行目

var cr = (mCanvasBorder.x + x + w - clipRight) / mCanvasScale;
var cb = (mCanvasBorder.y + y + h - clipBottom) / mCanvasScale;

正しくは

var cr = (mCanvasBorder.x + x + w - clipLeft - clipRight) / mCanvasScale;
var cb = (mCanvasBorder.y + y + h - clipTop - clipBottom) / mCanvasScale;

@seibe seibe reopened this Jan 9, 2017
@seibe seibe closed this as completed in e96f7a5 Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant