當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。