Configure options of items drawn on the Canvas

        Low-level access to the individual elements of markers and other
        items drawn on the timeline Canvas. All modifications are
        overwritten when the TimeLine is redrawn.
516908
def itemconfigure(self, iid, rectangle_options, text_options):
        
        rectangle_id, text_id = self._markers[iid]["rectangle_id"], self._markers[iid]["text_id"]
        if len(rectangle_options) != 0:
            self._timeline.itemconfigure(rectangle_id, **rectangle_options)
        if len(text_options) != 0:
            self._timeline.itemconfigure(text_id, **text_options)
770625
def redraw(self):
        
        if self._multiscat is not None:
            self._multiscat._update()
        self.vispy_widget.canvas.update()
1073152
function(pixel, drawing) {
        if(!this.line) {
            this.createFeature(pixel);
        }
        var lonlat = this.layer.getLonLatFromViewPortPx(pixel); 
        this.point.geometry.x = lonlat.lon;
        this.point.geometry.y = lonlat.lat;
        this.callback("modify", [this.point.geometry, this.getSketch(), drawing]);
        this.point.geometry.clearBounds();
        this.drawFeature();
    }
1032087
function(data) {
		var self = this;

		if (typeof data == 'string') {
			var self = this;
			TL.ConfigFactory.makeConfig(data, function(config) {
				self.setConfig(config);
			});
		} else if (TL.TimelineConfig == data.constructor) {
			this.setConfig(data);
		} else {
			this.setConfig(new TL.TimelineConfig(data));
		}
	}
1125360
def toggleDrawingSensitive(self, drawing=True):
        """"""
        self.actions.editMode.setEnabled(not drawing)
        if not drawing and self.beginner():
            # Cancel creation.
            print('Cancel creation.')
            self.canvas.setEditing(True)
            self.canvas.restoreCursor()
            self.actions.create.setEnabled(True)
562675
function (canvasEl) {
      this.lowerCanvasEl = fabric.util.getById(canvasEl) || this._createCanvasElement();
      this._initCanvasElement(this.lowerCanvasEl);

      fabric.util.addClass(this.lowerCanvasEl, 'lower-canvas');

      if (this.interactive) {
        this._applyCanvasStyle(this.lowerCanvasEl);
      }

      this.contextContainer = this.lowerCanvasEl.getContext('2d');
    }
911675
function(options) 
	{
		this.addEventListener(conbo.ConboEvent.CHANGE, this.__changeHandler, this, 999);
		
		var listOptions = ['itemClass'];
		
		conbo.assign(this, conbo.pick(options, listOptions));
		
		this.source = options.source || [];
	}
863986
function overrideAPI(qr) {
    var methods = [ 'canvas', 'image', 'save', 'saveSync', 'toDataURL' ];
    var i;

    function overrideMethod(name) {
      qr[name] = function () {
        throw new Error(name + ' requires HTML5 canvas element support');
      };
    }

    for (i = 0; i < methods.length; i++) {
      overrideMethod(methods[i]);
    }
  }
404976
function(option){
		option = option || {};
		var opt = {
			type   : (option.type   || this.instancetype || ''),
			width  : (option.width  || this.painter.canvasWidth),
			height : (option.height || this.painter.canvasHeight)
		};
		var newpuzzle = new pzpr.Puzzle(opt).open(this.getFileData(1,{history:!!option.history}));
		newpuzzle.restoreConfig(this.saveConfig());
		return newpuzzle;
	}
1339517
private void updatePaintables() {
		distance.setContent(formatUnits(widthInUnits));
		backGround.getBounds().setWidth(widthInPixels + 2 * HORIZONTAL_PADDING);
		rightMarker.getBounds().setX(leftMarker.getBounds().getX() + widthInPixels - 1);
		bottomLine.getBounds().setWidth(widthInPixels);
	}
1316428
def queue_draw_item(self, *items):
        
        gaphas_items = []
        for item in items:
            if isinstance(item, Element):
                gaphas_items.append(item)
            else:
                try:
                    gaphas_items.append(item.parent)
                except AttributeError:
                    pass
        super(ExtendedGtkView, self).queue_draw_item(*gaphas_items)
29598
def set_mode_cb(self, mode, tf):
        """"""
        if tf:
            self.canvas.set_draw_mode(mode)
            if mode == 'edit':
                self.edit_select_marks()
        return True
119874
private void editPoint() {
		if (selected == null) {
			return;
		}
		Color col = JColorChooser.showDialog(this, "Select Color", selected.col);
		if (col != null) {
			selected.col = col;
			repaint(0);
			fireUpdate();
		}
	}
363472
def _on_changed(self):
        
        self._updating = True
        to_collapse = []
        self.clear()
        if self._editor and self._outline_mode and self._folding_panel:
            items, to_collapse = self.to_tree_widget_items(
                self._outline_mode.definitions, to_collapse=to_collapse)
            if len(items):
                self.addTopLevelItems(items)
                self.expandAll()
                for item in reversed(to_collapse):
                    self.collapseItem(item)
                self._updating = False
                return

        # no data
        root = QtWidgets.QTreeWidgetItem()
        root.setText(0, _('No data'))
        root.setIcon(0, icons.icon(
            'dialog-information', ':/pyqode-icons/rc/dialog-info.png',
            'fa.info-circle'))
        self.addTopLevelItem(root)
        self._updating = False
        self.sync()
200726
function (src, data, cb) {
    var texture;
    texture = new THREE.CanvasTexture(src);
    setTextureProperties(texture, data);
    cb(texture);
  }
557095
function(options) {
        var _this = this;

        var original = options.originalTiledImage;
        delete options.original;

        var optionsClone = $.extend({}, options, {
            success: function(event) {
                var myItem = event.item;
                myItem._originalForNavigator = original;
                _this._matchBounds(myItem, original, true);

                function matchBounds() {
                    _this._matchBounds(myItem, original);
                }

                function matchOpacity() {
                    _this._matchOpacity(myItem, original);
                }

                function matchCompositeOperation() {
                    _this._matchCompositeOperation(myItem, original);
                }

                original.addHandler('bounds-change', matchBounds);
                original.addHandler('clip-change', matchBounds);
                original.addHandler('opacity-change', matchOpacity);
                original.addHandler('composite-operation-change', matchCompositeOperation);
            }
        });

        return $.Viewer.prototype.addTiledImage.apply(this, [optionsClone]);
    }
690700
def set_current_canvas(canvas):
    
    # Notify glir 
    canvas.context._do_CURRENT_command = True
    # Try to be quick
    if canvasses and canvasses[-1]() is canvas:
        return
    # Make this the current
    cc = [c() for c in canvasses if c() is not None]
    while canvas in cc:
        cc.remove(canvas)
    cc.append(canvas)
    canvasses[:] = [weakref.ref(c) for c in cc]