It is currently December 10th, 2018, 6:37 pm

[Bug] Shape: difference in position before / after combining

Report bugs with the Rainmeter application and suggest features.
User avatar
ikarus1969
Posts: 300
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

[Bug] Shape: difference in position before / after combining

ikarus1969 » October 2nd, 2018, 6:49 am

Good morning guys!

I have a problem using a shape consisting of triangles which i first want to rotate and then combine them to a new shape.

before combining, the single triangles look good and in the correct position. After combining them, the first shape is moved a certain amount of pixels (along its original x-axis?).

In the following screenshot you can see the single triangles and after that a screenshot after combinging them with the "Union" operator - can someone either direct me to a correct coding or confirm that this is a bug please?

Edit: Configuration added:
Rainmeter 4.3.0.3253 beta (64-bit)
Language: German (1031)
Build time: 2018-09-28 8:12:23
Commit Hash: 442ae103
Windows 7 Professional 64-bit (build 7601) Service Pack 1 - German (3079)
Edit: graphics adapter added:
AMD Radeon HD 8670D
Screenshot RM #1 - before combining.jpg
Screenshot RM #2 - after combining.jpg

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
ELLIPSE_ORIGIN.X=200
ELLIPSE_ORIGIN.Y=200

ELLIPSE_WIDTH=100
ELLIPSE_HEIGHT=160

[Meter_Test]
Meter=SHAPE
Shape= Path Path_Triangle | Rotate 330, (0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_HEIGHT#
Shape2=Path Path_Triangle | Rotate 240, (0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_HEIGHT#
; Shape3=Combine Shape | Union Shape2

Path_Triangle=(#ELLIPSE_ORIGIN.X# - 0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_ORIGIN.Y# | LineTo #ELLIPSE_ORIGIN.X#, (#ELLIPSE_ORIGIN.Y# - #ELLIPSE_HEIGHT#) | LineTo (#ELLIPSE_ORIGIN.X# + 0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_ORIGIN.Y# | ClosePath 1

SolidColor=FFFFFFFF
AntiAlias=1
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
oZone
Posts: 57
Joined: May 14th, 2018, 4:46 pm

Re: [Bug] Shape: difference in position before / after combining

oZone » October 12th, 2018, 6:10 am

I think it's bug. Parent shape will ignore anchors when you use rotate with non-zero degrees of angle.

Shape (red triangle) is same as Shape2 (parent shape, blue triangle, but hidden because of Shape5).
Shape3 is child shape (blue triangle) and Shape 4 is union.
Shape5 (black triangle) is same as Shape only without anchors.

if you scroll up/down it will increase/decrease degrees of angle for rotation.
Shape2 should be in same position as Shape but it's in position with Shape5.


Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
ELLIPSE_ORIGIN.X=200
ELLIPSE_ORIGIN.Y=200

ELLIPSE_WIDTH=100
ELLIPSE_HEIGHT=160

ROTATION=0

[Meter_test]
Meter=SHAPE
Shape= Path Path_Triangle | Rotate #ROTATION#, (0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_HEIGHT# | Fill Color 255,0,0,100
Shape2= Path Path_Triangle | Rotate #ROTATION# , (0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_HEIGHT# | Fill Color 0,0,255,100
Shape3=Path Path_Triangle | Rotate 240, (0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_HEIGHT#
Shape4=Combine Shape2 | Union Shape3
Shape5= Path Path_Triangle | Rotate #ROTATION# | Fill Color 0,0,0,255

Path_Triangle=(#ELLIPSE_ORIGIN.X# - 0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_ORIGIN.Y# | LineTo #ELLIPSE_ORIGIN.X#, (#ELLIPSE_ORIGIN.Y# - #ELLIPSE_HEIGHT#) | LineTo (#ELLIPSE_ORIGIN.X# + 0.5 * #ELLIPSE_WIDTH#), #ELLIPSE_ORIGIN.Y# | ClosePath 1

MouseScrollDownAction=[!SetVariable ROTATION (#ROTATION#-10)]
MouseScrollUpAction=[!SetVariable ROTATION (#ROTATION#+10)]
LeftMouseDownAction=[!SetVariable ROTATION 0]
SolidColor=FFFFFFFF
AntiAlias=1
DynamicVariables=1

[Meter_text]
Meter=String
X=(#ELLIPSE_WIDTH#/2)
Y=(#ELLIPSE_HEIGHT#/4)
FontSize=20
Text=[#ROTATION]
DynamicVariables=1
User avatar
ikarus1969
Posts: 300
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: [Bug] Shape: difference in position before / after combining

ikarus1969 » December 4th, 2018, 7:14 am

Maybe there's some spare time to have a look at this bug/behavior? After bringing the container-feature to life and the 2-month period please someone notice that? Thank you!
User avatar
jsmorley
Developer
Posts: 18445
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Bug] Shape: difference in position before / after combining

jsmorley » December 4th, 2018, 7:17 am

ikarus1969 wrote:
December 4th, 2018, 7:14 am
Maybe there's some spare time to have a look at this bug/behavior? After bringing the container-feature to life and the 2-month period please someone notice that? Thank you!
It's on the radar! :-)
User avatar
ikarus1969
Posts: 300
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: [Bug] Shape: difference in position before / after combining

ikarus1969 » December 4th, 2018, 7:28 am

thanks so much. . :bow: