```{index} single: create_similar (Cairo::Surface) ``` ```{index} single: Cairo::Surface::create_similar ``` # create_similar Creates a new surface of the same backend as an existing one, sized `$width` by `$height`, and returns it as the concrete subclass. It can be called either way round, as a class method naming the model surface or as a method on the model surface itself: ```text Cairo::Surface->create_similar($other, $content, $width, $height) $other->create_similar($content, $width, $height) ``` `$content` is `'color'`, `'alpha'` or `'color-alpha'`. The result is a blank surface, not a copy of `$other`; only the backend and its device characteristics are inherited, which is what makes it the efficient choice for an intermediate you will later composite back. Wraps `cairo_surface_create_similar`.