有办法在FXRuby中创建梯度吗?如果是的话,我将如何实现它?
我试过看https://www.rubydoc.info/gems/fxruby/Fox/FXImage,这对我来说没有多大意义,如果我能详细说明#gradient
的含义以及如何使用它,那就太好了。
发布于 2019-03-26 01:49:03
根据医生们,您将如何使用该方法,但首先需要安装并要求gem
gem install fxruby
然后在您的代码中:
require 'fxruby'
# the arguments represent rgb colors:
# #gradient(topleft, topright, bottomleft, bottomright)
您需要传递要用于实际渐变的RGB颜色,但下面是语法示例
FXImage.gradient(
Fox.FXRGB(253, 245, 230),
Fox.FXRGB(253, 245, 230),
Fox.FXRGB(253, 245, 230),
Fox.FXRGB(253, 245, 230)
)
请看这里的颜色示例
https://stackoverflow.com/questions/55348077
复制相似问题