InterviewDB Question · Los Angeles

Layer System: Implement a Composable Rendering Layer Stack with Blend Modes

Question Details

Problem Design a layer system for a graphics application. Each layer has: id, content (2D pixel grid), opacity (0.0-1.0), blend_mode ("normal"|"multiply"|"screen"), and visible flag. Implement: add_layer(layer, position) — insert layer at given z-position. flatten() -> Grid — composite all visible layers top-to-bottom using their blend modes. move_layer(id, new_position) — reorder layer. set_opacity(id, opacity) — update layer opacity. Follow-ups flatten recomputes from scratch every call. How w…

Full Details

🔒

Unlock all Figma questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a figma interview during the phone round.

It covers the following topics: Oop, Matrix, Phone, Coding, Onsite, Stack .