-
Notifications
You must be signed in to change notification settings - Fork 40
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
BlCircleGeometry and BlSquareGeometry do not have the same drawing logic #571
Comments
In this example, i only open the element in space and it works fine. circle(element := BlElement new
background: (BlPaintBackground new
paint: (BlColorPaint new
color: (Color r: 0.9110459433040078 g: 0.8836754643206256 b: 0.16911045943304007 alpha: 1.0);
yourself);
opacity: 1.0;
yourself);
border: (BlBorderBuilder new
paint: (BlColorPaint new
color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0);
yourself);
build);
geometry: BlCircleGeometry new;
constraintsDo: [:constraints | constraints horizontal exact: 200.0.
constraints horizontal exact: 20.0.
];
id: #A;
openInSpace) extent: 200 asPoint. square(element := BlElement new
background: (BlPaintBackground new
paint: (BlColorPaint new
color: (Color r: 0.9110459433040078 g: 0.8836754643206256 b: 0.16911045943304007 alpha: 1.0);
yourself);
opacity: 1.0;
yourself);
border: (BlBorderBuilder new
paint: (BlColorPaint new
color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0);
yourself);
build);
geometry: BlSquareGeometry new;
constraintsDo: [:constraints | constraints horizontal exact: 200.0.
constraints horizontal exact: 20.0.
];
id: #A;
openInSpace) extent: 200 asPoint. |
In this example the beahviour are differents BlElement new
clipChildren: false;
addChildren: {(BlElement new
background: Color green;
border: (BlBorderBuilder new
paint: Color black;
build);
geometry: BlCircleGeometry new;
constraintsDo: [:constraints | constraints horizontal exact: 200.0.
constraints vertical exact: 20.0.
constraints frame horizontal alignCenter.
constraints frame vertical alignCenter ];
id: #circle;
yourself) .
(BlElement new
background: Color green;
border: (BlBorderBuilder new
paint: Color black;
build);
geometry: BlSquareGeometry new;
constraintsDo: [:constraints | constraints horizontal exact: 200.0.
constraints vertical exact: 20.0.
constraints position: 0 @ 20 ];
id: #square;
yourself)};
id: #group;
openInSpace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I was playing with the Geometry and discover that BlCircleGeometry and BlSquareGeometry are a bit confusing.
In both example i create a rectangle shape (size := 200 @ 20) and put square and circle geometry inside.
We can see that the square element is drawn in the middle of it's bound while the circle geometry is drawn on the left side.
example with square
example with circle
The text was updated successfully, but these errors were encountered: