diff src/painter.h @ 41:3996f873a54b

core: implement walksprite, closes #2455
author David Demelier <markand@malikania.fr>
date Wed, 15 Jan 2020 13:11:47 +0100
parents 783841af4033
children 291be94202c7
line wrap: on
line diff
--- a/src/painter.h	Tue Jan 14 13:40:26 2020 +0100
+++ b/src/painter.h	Wed Jan 15 13:11:47 2020 +0100
@@ -30,14 +30,27 @@
 struct texture;
 
 /**
+ * Give the current texture being used for rendering, maybe NULL if the
+ * rendering is on root.
+ *
+ * \return texture or NULL
+ */
+struct texture *
+painter_get_target(void);
+
+/**
  * Set the rendering context to the given texture.
  *
+ * Since this function change an internal global variable it is strongly
+ * encouraged to store a local backup of the current texture using \a
+ * painter_get_target and call this function with it afterwards.
+ *
  * If texture is NULL, use default context aka the window.
  *
  * \param tex the texture
  */
 void
-painter_use(struct texture *tex);
+painter_set_target(struct texture *tex);
 
 /**
  * Get the current drawing color.