码迷,mamicode.com
首页 > 其他好文 > 详细

测试标题

时间:2019-12-18 13:11:59      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:rectangle   struct   div   cep   prot   功能   graphics   argument   选择   

标题1

标题2

标题3

 


 

如果您想要新增一些个性化的交互功能模块,那么您应该先修改项目./src/silence.js脚本文件。您需要在该文件中为将要新增的功能模块添加一些新的方法,然后在入口方法init()中的适当位置去调用它们。该文件代码结构清晰、注释完整,若您具备一定的 Javascript 开发经验,应该可以很容易看明白,这里就不再过多赘述。

如果您想要自定义某些元素的样式或者是新增交互功能模块需要添加新的样式,那么您应该修改项目./src/themes/*.less样式文件,*.less取决于您选择应用的主题风格,您需要在该文件中编写自定义的样式。在修改之前,建议您先了解 Less 的基础用法。

若您想要将自定义的样式应用到所有主题风格,建议您直接修改项目./src/silence.less公共样式文件,不过在编写样式代码的时候需要考虑各个主题风格的兼容性。

 

技术图片

 

 

 1   function _defineProperties(target, props) {
 2     for (var i = 0; i < props.length; i++) {
 3       var descriptor = props[i];
 4       descriptor.enumerable = descriptor.enumerable || false;
 5       descriptor.configurable = true;
 6       if ("value" in descriptor) descriptor.writable = true;
 7       Object.defineProperty(target, descriptor.key, descriptor);
 8     }
 9   }
10 
11   function _createClass(Constructor, protoProps, staticProps) {
12     if (protoProps) _defineProperties(Constructor.prototype, protoProps);
13     if (staticProps) _defineProperties(Constructor, staticProps);
14     return Constructor;
15   }

 

 

public BufferedImageLuminanceSource(BufferedImage image, int left, int top, int width, int height) {
        super(width, height);

        int sourceWidth = image.getWidth();
        int sourceHeight = image.getHeight();
        if (left + width > sourceWidth || top + height > sourceHeight) {
            throw new IllegalArgumentException("Crop rectangle does not fit within image data.");
        }

        for (int y = top; y < top + height; y++) {
            for (int x = left; x < left + width; x++) {
                if ((image.getRGB(x, y) & 0xFF000000) == 0) {
                    image.setRGB(x, y, 0xFFFFFFFF); // = white
                }
            }
        }

        this.image = new BufferedImage(sourceWidth, sourceHeight, BufferedImage.TYPE_BYTE_GRAY);
        this.image.getGraphics().drawImage(image, 0, 0, null);
        this.left = left;
        this.top = top;
    }

测试标题

标签:rectangle   struct   div   cep   prot   功能   graphics   argument   选择   

原文地址:https://www.cnblogs.com/lnexin1/p/12059198.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!