当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript imagediff.createCanvas函数代码示例

本文整理汇总了TypeScript中imagediff.createCanvas函数的典型用法代码示例。如果您正苦于以下问题:TypeScript createCanvas函数的具体用法?TypeScript createCanvas怎么用?TypeScript createCanvas使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了createCanvas函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeAll

 beforeAll(function() {
     jasmine.addMatchers(imagediff.jasmine);
     canvasState = new CanvasState(imagediff.createCanvas(300, 150), true);
     let node = new RawNode(50, 50, 'raw');
     canvasState.addShape(node);
     event = new MouseEvent('click', { screenX: 50, screenY: 50 });
     node.doDown(canvasState, event);
 });
开发者ID:cfe-lab,项目名称:Kive,代码行数:8,代码来源:contextmenu.tests.ts

示例2: it

        it('should ignore order of cables_in when wiring', function(){
            let pipeline = loadApiPipeline(this.canvasState, this.api_pipeline);
            pipeline.draw();

            // Now reverse the order of the cables_in
            let expectedCanvas = imagediff.createCanvas(600, 300);
            let expectedCanvasState = new CanvasState(expectedCanvas, true);
            this.api_pipeline.steps[1].cables_in.reverse();
            pipeline = loadApiPipeline(expectedCanvasState, this.api_pipeline);
            pipeline.draw();

            (expect(this.rawCanvas) as any).toImageDiffEqual(
                expectedCanvas);
        });
开发者ID:cfe-lab,项目名称:Kive,代码行数:14,代码来源:pipeline_functions.tests.ts

示例3: beforeAll

 beforeAll(function() {
     jasmine.addMatchers(imagediff.jasmine);
     canvasState = new CanvasState(imagediff.createCanvas(300, 150), true);
 });
开发者ID:cfe-lab,项目名称:Kive,代码行数:4,代码来源:pipeline_submit.tests.ts

示例4: beforeEach

    beforeEach(function() {
        var width = 600,
            height = 300;

        jasmine.addMatchers(imagediff.jasmine);
        this.rawCanvas = imagediff.createCanvas(width, height);
        this.canvas = new CanvasWrapper(this.rawCanvas);
        this.canvasState = new CanvasState(this.rawCanvas, true);

        this.api_pipeline = {
            "id": 25,
            "url": "http://127.0.0.1:8000/api/pipelines/25/",
            "family_pk": 2,
            "family": "Test",
            "revision_name": "",
            "revision_desc": "Carl Sagan's science slam-jam",
            "revision_number": 3,
            "revision_parent": 24,
            "revision_DateTime": "2015-06-10T19:36:31.570191Z",
            "user": "kive",
            "users_allowed": [],
            "groups_allowed": [],
            "inputs": [{
                "dataset_name": "input2",
                "dataset_idx": 1,
                "x": 0.15,
                "y": 0.15,
                "structure": {
                    "compounddatatype": 9,
                    "min_row": null,
                    "max_row": null
                }
            }, {
                "dataset_name": "input1",
                "dataset_idx": 2,
                "x": 0.05,
                "y": 0.3,
                "structure": null
            }],
            "outputs": [{
                "dataset_name": "unmapped2_fastq",
                "dataset_idx": 1,
                "x": 0.637772562280456,
                "y": 0.633208895290869,
                "structure": null
            }, {
                "dataset_name": "unmapped1_fastq",
                "dataset_idx": 2,
                "x": 0.637772562280456,
                "y": 0.633208895290869,
                "structure": null
            }, {
                "dataset_name": "remap_conseq",
                "dataset_idx": 3,
                "x": 0.637772562280456,
                "y": 0.633208895290869,
                "structure": {
                    "compounddatatype": 10,
                    "min_row": null,
                    "max_row": null
                }
            }, {
                "dataset_name": "remap",
                "dataset_idx": 4,
                "x": 0.637772562280456,
                "y": 0.633208895290869,
                "structure": {
                    "compounddatatype": 8,
                    "min_row": null,
                    "max_row": null
                }
            }, {
                "dataset_name": "remap_counts",
                "dataset_idx": 5,
                "x": 0.637772562280456,
                "y": 0.633208895290869,
                "structure": {
                    "compounddatatype": 9,
                    "min_row": null,
                    "max_row": null
                }
            }],
            "steps": [{
                "transformation": 4,
                "transformation_family": 3,
                "step_num": 1,
                "outputs_to_delete": [],
                "x": 0.344662650584514,
                "y": 0.5,
                "name": "prelim_map.py",
                "cables_in": [{
                    "source_step": 0,
                    "source": 143,
                    "source_dataset_name": "input1",
                    "dest": 7,
                    "dest_dataset_name": "fastq1",
                    "custom_wires": [],
                    "keep_output": false
                }, {
                    "source_step": 0,
//.........这里部分代码省略.........
开发者ID:cfe-lab,项目名称:Kive,代码行数:101,代码来源:pipeline_functions.tests.ts

示例5: beforeEach

    beforeEach(function() {
        let width = 600,
            height = 300;

        jasmine.addMatchers(imagediff.jasmine);
        this.rawCanvas = imagediff.createCanvas(width, height);
        this.canvas = new CanvasWrapper(this.rawCanvas);
        this.canvasState = new CanvasState(this.rawCanvas, true);
        $error = $('<div>').appendTo('body').hide();

        this.api_pipeline = {
            "files": [
                "prelim_map.py",
                "remap.py",
                "helper.py"
            ],
            "pipeline": {
                "kive_version": "0.14",
                "default_config": {
                    "parent_family": "sample",
                    "parent_tag": "basic",
                    "parent_md5": "8dab0b3c7b7d812f0ba4819664be8acb",
                    "memory": 100,
                    "threads": 1
                },
                "inputs": [{
                    "dataset_name": "input2",
                    "x": 0.15,
                    "y": 0.15,
                }, {
                    "dataset_name": "input1",
                    "x": 0.05,
                    "y": 0.3,
                }],
                "outputs": [{
                    "dataset_name": "unmapped2_fastq",
                    "source_step": 2,
                    "source_dataset_name": "unmapped2_fastq",
                    "x": 0.637772562280456,
                    "y": 0.633208895290869,
                }, {
                    "dataset_name": "unmapped1_fastq",
                    "source_step": 2,
                    "source_dataset_name": "unmapped1_fastq",
                    "x": 0.637772562280456,
                    "y": 0.633208895290869,
                }, {
                    "dataset_name": "remap_conseq",
                    "source_step": 2,
                    "source_dataset_name": "remap_conseq",
                    "x": 0.637772562280456,
                    "y": 0.633208895290869,
                }, {
                    "dataset_name": "remap",
                    "source_step": 2,
                    "source_dataset_name": "remap",
                    "x": 0.637772562280456,
                    "y": 0.633208895290869,
                }, {
                    "dataset_name": "remap_counts",
                    "source_step": 2,
                    "source_dataset_name": "remap_counts",
                    "x": 0.637772562280456,
                    "y": 0.633208895290869,
                }],
                "steps": [{
                    "x": 0.344662650584514,
                    "y": 0.5,
                    "driver": "prelim_map.py",

                    "inputs": [{
                        "dataset_name": "fastq1",
                        "source_step": 0,
                        "source_dataset_name": "input1",
                    }, {
                        "dataset_name": "fastq2",
                        "source_step": 0,
                        "source_dataset_name": "input2",
                    }],
                    "outputs": ["prelim"],
                }, {
                    "x": 0.450583501602465,
                    "y": 0.257130788000083,
                    "driver": "remap.py",
                    "inputs": [{
                        "dataset_name": "fastq1",
                        "source_step": 0,
                        "source_dataset_name": "input1",
                    }, {
                        "dataset_name": "fastq2",
                        "source_step": 0,
                        "source_dataset_name": "input2",
                    }, {
                        "dataset_name": "prelim",
                        "source_step": 1,
                        "source_dataset_name": "prelim",
                    }],
                    "outputs": [
                        "remap",
                        "remap_counts",
//.........这里部分代码省略.........
开发者ID:cfe-lab,项目名称:Kive,代码行数:101,代码来源:pipeline_functions.tests.ts


注:本文中的imagediff.createCanvas函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。