lib/renderers/html/hierarchy.rb in atome-0.5.6.4.8 vs lib/renderers/html/hierarchy.rb in atome-0.5.6.5.1
- old
+ new
@@ -36,11 +36,10 @@
green = parent_found.green * 255
blue = parent_found.blue * 255
alpha = parent_found.alpha
html.style(:backgroundColor, "rgba(#{red}, #{green}, #{blue}, #{alpha})")
when :paint
-
# if when found colors when use it for the gradient , else whe use the colors within the current atome
# gradient_found = params[:colors] || @apply
# we get all the paint atomes applied to the current atome
gradients_to_apply = []
paint.each do |paint_id|
@@ -73,9 +72,20 @@
# TODO : create complexe gradient staking the gradients uncommenting the line below
# beware the colors_to_apply syntax is incorrect for complexe gradient
# full_gradient_to_apply=gradients_to_apply.join(',')
full_gradient_to_apply = gradients_to_apply.last
html.style(:background, full_gradient_to_apply)
+ when :border
+ border.each do |border_id_found|
+ border_found = grab(border_id_found)
+ red = border_found.red * 255
+ green = border_found.green * 255
+ blue = border_found.blue * 255
+ alpha = border_found.alpha
+ thickness = border_found.thickness
+ pattern = border_found.pattern
+ html.style(:border, "#{pattern} #{thickness}px rgba(#{red},#{green},#{blue},#{alpha})")
+ end
else
#
end
end