| |||||||
Das Thema "Blending ausschalten/umgehen für Canvas.drawXXX" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.
|
| | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Erfahrener Benutzer | Folgendes Problem: Ich hab eine bitmap (komplett weiss), wenn ich nun mittels canvas auf diese bitmap ein komplett transparentes Rechteck zeichnen möchte (color = 0x00000000), dann hab ich das problem, dass an der bitmap nichts geändert wird, da beim blending vermutlich irgendsowas gerechnet wird Code: NeueFarbeRotAnteil = (AlteFarbeRotAnteil * (ALPHA_MAX - MalFarbeAlpha)) + (MalFarbeRotAnteil * MalFarbeAlpha); ... Code: NeueFarbeRotAnteil = MalFarbeRotAnteil; Ich nehme mal an, dass man im Paint- Objekt dazu eine Flag setzen muss, ich seh aber grad beim besten Willen nicht welche... jemand eine Ahnung? Danke im Voraus.
__________________ Up the shut fuck, you must! |
| | |
| | #2 (permalink) |
| Erfahrener Benutzer |
Lösung gefunden: statt: Code: rect.set(...); paint.setColor(...); canvas.drawRect(rect, paint); Code: canvas.save(); rect.set(...); canvas.clipRect(rect); canvas.drawColor(color, PorterDuff.Mode.SRC); canvas.restore();
__________________ Up the shut fuck, you must! |
| | |
![]() |
|
| Themen-Optionen | |
| Ansicht | |
| |
| ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| App zum Ausschalten der Rotation für bestimmte Programme (für HTC Hero, Android 1.5) | nixgegendenise | Tools | 2 | 15.08.2011 21:53 |
| canvas probleme | tenji73 | Android App Entwicklung | 1 | 14.12.2010 08:50 |
| OutOfMemory - Canvas | funcoder | Android App Entwicklung | 3 | 08.12.2010 17:45 |
| Koordinatensystem für Canvas | BenOtto | Android App Entwicklung | 6 | 13.10.2010 13:18 |
| Transparenter Canvas | manu | Android App Entwicklung | 2 | 09.01.2010 14:10 |