Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is
        drawing the device. Overlays with this transform type cannot receive mouse events.
776887
def setOverlayTransformTrackedDeviceComponent(self, ulOverlayHandle, unDeviceIndex, pchComponentName):
        

        fn = self.function_table.setOverlayTransformTrackedDeviceComponent
        result = fn(ulOverlayHandle, unDeviceIndex, pchComponentName)
        return result
909867
public GVRRenderData setDrawMode(int drawMode) {
        if (drawMode != GL_POINTS && drawMode != GL_LINES
                && drawMode != GL_LINE_STRIP && drawMode != GL_LINE_LOOP
                && drawMode != GL_TRIANGLES && drawMode != GL_TRIANGLE_STRIP
                && drawMode != GL_TRIANGLE_FAN) {
            throw new IllegalArgumentException(
                    "drawMode must be one of GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES, GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP.");
        }
        NativeRenderData.setDrawMode(getNative(), drawMode);
        return this;
    }
270534
synchronized void paintComponent(Graphics componentGraphics) {
        int width = getWidth();
        int height = getHeight();

        this.scrollController.updateModel(
                virtualTerminal.getBufferLineCount() * getFontHeight(),
                height);

        boolean needToUpdateBackBuffer =
                // User has used the scrollbar, we need to update the back buffer to reflect this
                lastBufferUpdateScrollPosition != scrollController.getScrollingOffset() ||
                        // There is blinking text to update
                        hasBlinkingText ||
                        // We simply have a hint that we should update everything
                        needFullRedraw;

        // Detect resize
        if(width != lastComponentWidth || height != lastComponentHeight) {
            int columns = width / getFontWidth();
            int rows = height / getFontHeight();
            TerminalSize terminalSize = virtualTerminal.getTerminalSize().withColumns(columns).withRows(rows);
            virtualTerminal.setTerminalSize(terminalSize);

            // Back buffer needs to be updated since the component size has changed
            needToUpdateBackBuffer = true;
        }

        if(needToUpdateBackBuffer) {
            updateBackBuffer(scrollController.getScrollingOffset());
        }

        ensureGraphicBufferHasRightSize();
        Rectangle clipBounds = componentGraphics.getClipBounds();
        if(clipBounds == null) {
            clipBounds = new Rectangle(0, 0, getWidth(), getHeight());
        }
        componentGraphics.drawImage(
                backbuffer,
                // Destination coordinates
                clipBounds.x,
                clipBounds.y,
                clipBounds.width,
                clipBounds.height,
                // Source coordinates
                clipBounds.x,
                clipBounds.y,
                clipBounds.width,
                clipBounds.height,
                null);

        // Take care of the left-over area at the bottom and right of the component where no character can fit
        //int leftoverHeight = getHeight() % getFontHeight();
        int leftoverWidth = getWidth() % getFontWidth();
        componentGraphics.setColor(Color.BLACK);
        if(leftoverWidth > 0) {
            componentGraphics.fillRect(getWidth() - leftoverWidth, 0, leftoverWidth, getHeight());
        }

        //0, 0, getWidth(), getHeight(), 0, 0, getWidth(), getHeight(), null);
        this.lastComponentWidth = width;
        this.lastComponentHeight = height;
        componentGraphics.dispose();
        notifyAll();
    }
737906
def on_draw(self):
        
        self._update_meshes()
        gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT)
        gl.glLoadIdentity()

        # pull the new camera transform from the scene
        transform_camera = self.scene.graph.get(
            frame_to='world',
            frame_from=self.scene.camera.name)[0]

        # apply the camera transform to the matrix stack
        gl.glMultMatrixf(rendering.matrix_to_gl(transform_camera))

        # we want to render fully opaque objects first,
        # followed by objects which have transparency
        node_names = collections.deque(self.scene.graph.nodes_geometry)
        # how many nodes did we start with
        count_original = len(node_names)
        count = -1

        # if we are rendering an axis marker at the world
        if self._axis:
            # we stored it as a vertex list
            self._axis.draw(mode=gl.GL_TRIANGLES)

        while len(node_names) > 0:
            count += 1
            current_node = node_names.popleft()

            # get the transform from world to geometry and mesh name
            transform, geometry_name = self.scene.graph[current_node]

            # if no geometry at this frame continue without rendering
            if geometry_name is None:
                continue

            # if a geometry is marked as fixed apply the inverse view transform
            if self.fixed is not None and geometry_name in self.fixed:
                # remove altered camera transform from fixed geometry
                transform_fix = np.linalg.inv(
                    np.dot(self._initial_camera_transform, transform_camera))
                # apply the transform so the fixed geometry doesn't move
                transform = np.dot(transform, transform_fix)

            # get a reference to the mesh so we can check transparency
            mesh = self.scene.geometry[geometry_name]
            if mesh.is_empty:
                continue

            # add a new matrix to the model stack
            gl.glPushMatrix()
            # transform by the nodes transform
            gl.glMultMatrixf(rendering.matrix_to_gl(transform))

            # draw an axis marker for each mesh frame
            if self.view['axis'] == 'all':
                self._axis.draw(mode=gl.GL_TRIANGLES)

            # transparent things must be drawn last
            if (hasattr(mesh, 'visual') and
                hasattr(mesh.visual, 'transparency')
                    and mesh.visual.transparency):
                # put the current item onto the back of the queue
                if count < count_original:
                    # add the node to be drawn last
                    node_names.append(current_node)
                    # pop the matrix stack for now
                    gl.glPopMatrix()
                    # come back to this mesh later
                    continue

            # if we have texture enable the target texture
            texture = None
            if geometry_name in self.textures:
                texture = self.textures[geometry_name]
                gl.glEnable(texture.target)
                gl.glBindTexture(texture.target, texture.id)

            # get the mode of the current geometry
            mode = self.vertex_list_mode[geometry_name]
            # draw the mesh with its transform applied
            self.vertex_list[geometry_name].draw(mode=mode)
            # pop the matrix stack as we drew what we needed to draw
            gl.glPopMatrix()

            # disable texture after using
            if texture is not None:
                gl.glDisable(texture.target)
1021803
void applyTransformation(Transformation2D transform) {
		m_vertices_mp.applyTransformation(transform);
		if (m_segments != null) {
			for (int i = 0, n = m_segments.size(); i < n; i++) {
				if (m_segments.get(i) != null) {
					m_segments.get(i).applyTransformation(transform);
				}
			}
		}
	}
590083
function setProjection(w, h) {
         this.flush();
         this.gl.viewport(0, 0, w, h);
         this.uMatrix.setTransform(2 / w, 0, 0, 0, -2 / h, 0, -1, 1, 1);
       }
1031385
@Override
    protected void paintComponent(Graphics g) {
        if (!isInitialized()) {
            return;
        }

        final Graphics2D G2 = (Graphics2D) g.create();

        CENTER.setLocation(getGaugeBounds().getCenterX(), getGaugeBounds().getCenterX());

        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
        G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        // Translate the coordinate system related to the insets
        G2.translate(getFramelessOffset().getX(), getFramelessOffset().getY());

        final AffineTransform OLD_TRANSFORM = G2.getTransform();

        // Draw combined background image
        G2.drawImage(bImage, 0, 0, null);

        // Draw LCD display
        if (isLcdVisible()) {
            if (getLcdColor() == LcdColor.CUSTOM) {
                G2.setColor(getCustomLcdForeground());
            } else {
                G2.setColor(getLcdColor().TEXT_COLOR);
            }
            G2.setFont(getLcdUnitFont());
            if (isLcdUnitStringVisible()) {
                unitLayout = new TextLayout(getLcdUnitString(), G2.getFont(), RENDER_CONTEXT);
                UNIT_BOUNDARY.setFrame(unitLayout.getBounds());
                G2.drawString(getLcdUnitString(), (float) (LCD.getX() + (LCD.getWidth() - UNIT_BOUNDARY.getWidth()) - LCD.getWidth() * 0.03), (float) (LCD.getY() + LCD.getHeight() * 0.76));
                unitStringWidth = UNIT_BOUNDARY.getWidth();
            } else {
                unitStringWidth = 0;
            }
            G2.setFont(getLcdValueFont());
            switch (getModel().getNumberSystem()) {
                case HEX:
                    valueLayout = new TextLayout(Integer.toHexString((int) getLcdValue()).toUpperCase(), G2.getFont(), RENDER_CONTEXT);
                    VALUE_BOUNDARY.setFrame(valueLayout.getBounds());
                    G2.drawString(Integer.toHexString((int) getLcdValue()).toUpperCase(), (float) (LCD.getX() + (LCD.getWidth() - unitStringWidth - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09), (float) (LCD.getY() + LCD.getHeight() * 0.76));
                    break;

                case OCT:
                    valueLayout = new TextLayout(Integer.toOctalString((int) getLcdValue()), G2.getFont(), RENDER_CONTEXT);
                    VALUE_BOUNDARY.setFrame(valueLayout.getBounds());
                    G2.drawString(Integer.toOctalString((int) getLcdValue()), (float) (LCD.getX() + (LCD.getWidth() - unitStringWidth - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09), (float) (LCD.getY() + LCD.getHeight() * 0.76));
                    break;

                case DEC:

                default:
                    valueLayout = new TextLayout(formatLcdValue(getLcdValue()), G2.getFont(), RENDER_CONTEXT);
                    VALUE_BOUNDARY.setFrame(valueLayout.getBounds());
                    G2.drawString(formatLcdValue(getLcdValue()), (float) (LCD.getX() + (LCD.getWidth() - unitStringWidth - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09), (float) (LCD.getY() + LCD.getHeight() * 0.76));
                    break;
            }
            // Draw lcd info string
            if (!getLcdInfoString().isEmpty()) {
                G2.setFont(getLcdInfoFont());
                infoLayout = new TextLayout(getLcdInfoString(), G2.getFont(), RENDER_CONTEXT);
                INFO_BOUNDARY.setFrame(infoLayout.getBounds());
                G2.drawString(getLcdInfoString(), LCD.getBounds().x + 5f, LCD.getBounds().y + (float) INFO_BOUNDARY.getHeight() + 5f);
            }
        }

        // Draw the 10000ft pointer
        //final double ANGLE10000FT = ((value10000 - getMinValue()) * angleStep10000ft);
        G2.rotate(((value10000 - getMinValue()) * angleStep10000ft), CENTER.getX(), CENTER.getY());
        G2.drawImage(pointer10000FtImage, 0, 0, null);
        G2.setTransform(OLD_TRANSFORM);

        // Draw the 1000ft pointer
        //final double ANGLE1000FT = ((value1000 - getMinValue()) * angleStep1000ft);
        G2.rotate(((value1000 - getMinValue()) * angleStep1000ft), CENTER.getX(), CENTER.getY());
        G2.drawImage(pointer1000FtImage, 0, 0, null);
        G2.setTransform(OLD_TRANSFORM);

        // Draw the 100ft pointer
        //final double ANGLE100FT = ((value100 - getMinValue()) * angleStep100ft);
        G2.rotate(((value100 - getMinValue()) * angleStep100ft), CENTER.getX(), CENTER.getY());
        G2.drawImage(pointer100FtImage, 0, 0, null);
        G2.setTransform(OLD_TRANSFORM);

        // Draw combined foreground image
        G2.drawImage(fImage, 0, 0, null);

        if (!isEnabled()) {
            G2.drawImage(disabledImage, 0, 0, null);
        }

        // Translate the coordinate system back to original
        G2.translate(-getInnerBounds().x, -getInnerBounds().y);

        G2.dispose();
    }
787911
@Override
	public void render(GuiRenderer renderer)
	{
		if (!isVisible())
			return;

		//		if (getGui().isOverlay())
		//		{
		//			GlStateManager.blendFunc(GL11.GL_CONSTANT_ALPHA, GL11.GL_ONE_MINUS_CONSTANT_ALPHA);
		//			GL14.glBlendColor(1, 1, 1, (float) getAlpha() / 255);
		//		}

		//store last drawn component so that it can be set back after drawing.
		//makes sure components overriding rendering and calling super still have correct
		//relative position in case super renders other components.
		UIComponent oldComponent = renderer.currentComponent;

		//draw background
		IGuiRenderer gr = backgroundRenderer.get();
		if (gr != null)
		{
			renderer.currentComponent = this;
			gr.render(renderer);
			renderer.next();
		}

		//draw foreground
		gr = foregroundRenderer.get();
		if (gr != null)
		{
			ClipArea area = IClipable.intersected(this);
			if (!area.fullClip())
			{
				if (!(this instanceof IControlComponent))
					renderer.startClipping(area);
				renderer.currentComponent = this;
				gr.render(renderer);
				if (!(this instanceof IControlComponent))
					renderer.endClipping(area);
			}
		}

		for (IControlComponent c : controlComponents)
			c.render(renderer);

		renderer.currentComponent = oldComponent;
	}
1223299
function() {
        var target = this.redoStack && this.redoStack.pop();
        if (target) {
            this.line.geometry.addComponent(target, this.getCurrentPointIndex());
            this.drawFeature();
        }
        return !!target;
    }
1260449
@Override
    public void drawWithTransforms(final Context2D context, final double alpha, final BoundingBox bounds)
    {
        if ((context.isSelection()) && (false == isListening()))
        {
            return;
        }
        if (context.isDrag() || isVisible())
        {
            context.saveContainer();

            final Transform xfrm = getPossibleNodeTransform();

            if (null != xfrm)
            {
                context.transform(xfrm);
            }
            drawWithoutTransforms(context, alpha, bounds);

            context.restoreContainer();
        }
    }
1241875
public void setOverlayUrl(final String overlayUrl) {
		String currOverlayUrl = getOverlayUrl();

		if (!Objects.equals(overlayUrl, currOverlayUrl)) {
			ImageEditModel model = getOrCreateComponentModel();
			model.overlayUrl = overlayUrl;
		}
	}
263507
@Override
    public void draw() {
        if (googleRenderer == null)  {
            getPresenter().showError(new ClientRuntimeError("Google renderer not set"));
        }
        else if (!getPresenter().isDrawn())  {
            List<Displayer> displayerList = new ArrayList<Displayer>();
            displayerList.add(getPresenter());
            googleRenderer.draw(displayerList);
        }
    }
676756
function () {
            var m = this.transformation, devicePixelRatio = window.devicePixelRatio || 1;

            this.layer.forEach(function (l) {
                l.ctx.setTransform(devicePixelRatio * m[0][0], m[1][0], m[0][1], devicePixelRatio * m[1][1], devicePixelRatio * m[0][2], devicePixelRatio * m[1][2]);
            });
        }
394290
def setRenderer(self, renderer):
        
        if not isinstance(renderer, XChartRenderer):
            renderer = XChartRenderer.plugin(nativestring(renderer))
        
        if renderer is None:
            return False
        
        self._renderer = renderer
        
        for act in self.uiTypeBTN.actions():
            if act.text() == '%s Chart' % renderer.name():
                self.uiTypeBTN.setDefaultAction(act)
                break
        
        return True
147132
public void paintComponent(Graphics g)
	{
		super.paintComponent(g);

		// setup the graphics
		Graphics2D _g2 = (Graphics2D) (g.create());
		_g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
		AffineTransform _at = computeTransformation(true);
		_g2.transform(_at);

		// do the drawing
		paintPaper(_g2);

		if (null != getContent())
		{
			getContent().paint(_g2);
		}
	}
675516
function (renderer) {
            var viewport = me.game.viewport,
                width = this.imagewidth,
                height = this.imageheight,
                bw = viewport.bounds.width,
                bh = viewport.bounds.height,
                ax = this.anchorPoint.x,
                ay = this.anchorPoint.y,
                x = this.pos.x,
                y = this.pos.y;

            if (this.ratio.x === this.ratio.y === 0) {
                x = x + ax * (bw - width);
                y = y + ay * (bh - height);
            }

            renderer.translate(x, y);
            renderer.drawPattern(
                this._pattern,
                0,
                0,
                viewport.width * 2,
                viewport.height * 2
            );
        }
755483
public void setTouchDrawable(TouchEffectDrawable touchDrawable) {
        if (mTouchDrawable != touchDrawable) {
            if (mTouchDrawable != null) {
                mTouchDrawable.setCallback(null);
            }
            if (touchDrawable != null) {
                touchDrawable.setCallback(this);
                // We must set layer type is View.LAYER_TYPE_SOFTWARE,
                // to support Canvas.clipPath()
                // on Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
                if (getLayerType() != View.LAYER_TYPE_SOFTWARE)
                    setLayerType(View.LAYER_TYPE_SOFTWARE, null);
            }
            mTouchDrawable = touchDrawable;
        }
    }