Engineering Taksal Studio: 300 DPI Vector Skia Canvas & On-Device Magic Layers in Jetpack Compose
When we set out to build Taksal Studio, the goal was ambitious: provide micro-merchants and freelance designers with a desktop-grade vector design studio and comprehensive commerce suite directly on their Android phones — operating 100% offline without mandatory cloud subscriptions.
At A Glance
- • Package: com.card.mint.cardbuilder (Version 3.0.0, SDK 37)
- • Multi-Module: 8 decoupled modules (:app, :core-domain, :feature-editor, :feature-business...)
- • Canvas Engine: 300 DPI Skia sub-pixel coordinate rendering & snapping
- • Security: Android KeyStore TEE hardware AES-256-GCM database key
1. The Problem: The Mobile Creative Gap
Commercial offset printers require vector artwork rendered at a minimum of 300 DPI with CMYK color margins. Most existing mobile design apps rasterize elements to low-resolution screen bitmaps, causing disastrous pixelation when printed on visiting cards or marketing flyers. Additionally, Indian merchants required simultaneous invoicing, POS receipts, and UPI QR codes, forcing them to juggle 3-4 bloated cloud apps.
2. The 300 DPI Vector Coordinate Engine
Instead of relying on standard Android View hierarchies, we built a pure Compose vector canvas engine backed by Skia shaders. By modeling all artwork elements in normalized physical millimeter space (converting to 300 DPI raster pixels only at the final export boundary), designs maintain surgical mathematical precision whether displayed on a 6-inch phone or exported to an A3 print poster.
To prevent memory bloat, we refactored the canvas data model into a sealed CanvaElement hierarchy:
CanvaElement.Text: Carries typography, curved text math, line spacing, and shadow shaders.CanvaElement.Shape: 18 geometric vector primitives with stroke and gradient fills.CanvaElement.Image: High-res bitmaps with blend modes and image filters.CanvaElement.BrushStroke: Dynamic bezier smoothing for stylus signatures and freehand sketches.
3. On-Device Magic Layers: Flat Raster to Editable Vectors
One of the most complex features is Magic Layers. Users often want to edit a flattened logo or business card template they received on WhatsApp. Instead of routing customer graphics through a remote cloud server, we engineered an on-device computer vision engine (MagicLayersEngine.kt).
Using color quantization heuristics, morphological edge filtering, and connected-component labeling, the engine isolates distinct foreground elements, extracts their bounding geometries, and re-injects them into the canvas as independent, draggable, rotatable layers — all executed locally within 400 milliseconds.
4. Hardware-Backed Cryptography in the KeyStore TEE
Unlike cloud-based tools that store customer databases on external servers, Taksal Studio honors strict local data sovereignty. All GST invoices, customer phone numbers, and brand kits are persisted in an encrypted local Room SQLite database.
The 256-bit AES encryption key is generated on-device using a hardware-backed master key located inside the Android KeyStore Trusted Execution Environment (TEE). Even if a device is rooted, the database passphrase cannot be dumped from raw memory.
5. Thermal POS & SME Invoicing Pipeline
We integrated a hardware printer abstraction layer supporting Bluetooth and USB OTG 58mm and 80mm ESC/POS thermal printers. Retailers can ring up sales, calculate CGST/SGST/IGST breakdown automatically, and print physical paper receipts straight from their phone without needing an expensive dedicated POS terminal.
Experience Taksal Studio
Taksal Studio is live on Google Play and backed by an interactive companion web studio featuring a 3D business card simulator and POS billing preview.