def setPixelWidth(self, width): """ Sets the CSS width in pixels for the canvas. @param width width of the canvas in pixels """ width = int(width) self.pixelWidth = width FocusWidget.setWidth(self, width) DOM.setElemAttribute(self.canvas, "width", str(width)) self._set_base_transform()
def setPixelWidth(self, width): width = int(width) self.pixelWidth = width FocusWidget.setWidth(self, width) DOM.setElemAttribute(self.canvas, "width", str(width)) self._set_base_transform()
def setWidth(self, width): FocusWidget.setWidth(self, width) self.canvas.width = width
def setPixelWidth(self, width): FocusWidget.setWidth(self, str(width) + "px") self.impl.setPixelWidth(self.getCanvasElement(), width)