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

Color overwritten using dipping pattern recipe #701

Open
lewi0622 opened this issue Feb 27, 2024 · 0 comments
Open

Color overwritten using dipping pattern recipe #701

lewi0622 opened this issue Feb 27, 2024 · 0 comments

Comments

@lewi0622
Copy link

The file being read, "Demo_2_colors.svg" has two different stroke colors. After using splitdist to insert a dip svg, the first layer has it's color overwritten, and shows as black (#000000), while the second layer's color is intact. Based on the printed color and proplist info, this overwriting seems to occur at the conclusion of the first forlayer block.

vpype \ eval "dip_files=[r'Dip_locations\Circles\Dip_1.svg', r'Dip_locations\Circles\Dip_2.svg']" \ read -a stroke "Demo_2_colors.svg" \ forlayer \ eval "%print('start', _color)%" \ lmove %_lid% 1 \ splitdist 50cm \ eval "j=_i" \ forlayer \ lmove %_lid% "%_lid*2%" \ read -l "%_lid*2-1%" %dip_files[j]% \ end \ lmove all %_lid% \ eval "%print('end', _color)%" \ end \ proplist \ write "Demo_2_colors_PAINT.svg"

The output of the print statements above:
start #67d8fa
end #67d8fa
start #27ff71
end #27ff71
WARNING:root:neither --global nor --layer options were provide, assuming --layer all
listing 8 properties for layer 1
svg_fill: (str) #FFFFFF
svg_stroke: (str) #000000
svg_stroke-dasharray: (str)
svg_stroke-linecap: (str) square
svg_stroke-miterlimit: (str) 10
vp_color: (color) #000000
vp_pen_width: (float) 1.0
vp_source: (WindowsPath) C:\Users\lewi0\Desktop\lewi0622.github.io\Vpype_Stuff\Dip_locations\Circles\Dip_1.svg
listing 8 properties for layer 2
svg_fill: (str) #FFFFFF
svg_stroke: (str) rgb(39,255,113)
svg_stroke-dasharray: (str)
svg_stroke-linecap: (str) round
svg_stroke-miterlimit: (str) 10
svg_stroke-opacity: (str) 1
vp_color: (color) #27ff71
vp_pen_width: (float) 1.0

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

No branches or pull requests

1 participant