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

[実行時エラー] RoundRectの枠の描画が破綻する #856

Closed
sthairno opened this issue Jul 30, 2022 · 1 comment
Closed

[実行時エラー] RoundRectの枠の描画が破綻する #856

sthairno opened this issue Jul 30, 2022 · 1 comment

Comments

@sthairno
Copy link
Member

エラーの内容 | Describe the runtime error

RoundRectの内側の線を描画する際、半径が枠の太さを下回ると描画が破綻します。

gifはHTMLとSiv3Dで同じ挙動をするテストコードを作成し、比較した動画です。
使用したテストコードは再現方法 | To Reproduceにあります。

半径 > 枠太さ
rrect1

半径 < 枠太さ
rrect2

再現方法 | To Reproduce

HTML
https://jsfiddle.net/23Lnzq7x/12/

Siv3D

#include <Siv3D.hpp> // OpenSiv3D v0.6.4

void Main()
{
	Scene::SetBackground(ColorF(0.9));

	double frameThickness = 0;
	double roundSize = 0;

	while (System::Update())
	{
		SimpleGUI::Slider(frameThickness, 0.0, 100.0, { 5, 5 }, 200.0);
		SimpleGUI::Slider(roundSize, 0.0, 100.0, { 5, 45 }, 200.0);

		RoundRect rrect(5, 85, 100 + frameThickness * 2, 100 + frameThickness * 2, roundSize);
		rrect.drawFrame(frameThickness, 0, Palette::Black);
	}
}

発生環境(デスクトップの場合) | Desktop (please complete the following information):

  • OS: Windows 11
  • バージョン | Version: OpenSiv3D v0.6.4
  • GPU: NVIDIA GeForce RTX 3070
  • ブラウザ (Web 版) | Browser: Firefox

備考 | Additional context

@Reputeless Reputeless added this to Investigating in v0.6 Roadmap Aug 6, 2022
@Reputeless Reputeless moved this from Investigating to Done in v0.6 Roadmap Aug 6, 2022
@Reputeless
Copy link
Member

Reputeless commented Aug 6, 2022

開発中の v0.6.5 で、Rect / RectF / RoundRect の drawFrame() にどのような値を渡しても異常な結果が表示されないよう修正しました。ご報告ありがとうございます!

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

No branches or pull requests

2 participants