From e10f26fc8a6dbdeb7eabe61836840b6496af5267 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 28 Apr 2024 18:31:37 -0400 Subject: [PATCH] docs: Clarify the cairo interaction section This was giving outdated advice. --- docs/reference/gdk/cairo.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/reference/gdk/cairo.md b/docs/reference/gdk/cairo.md index f622e8879e..79a4ef8ded 100644 --- a/docs/reference/gdk/cairo.md +++ b/docs/reference/gdk/cairo.md @@ -5,8 +5,11 @@ Title: Cairo interaction [Cairo](http://cairographics.org) is a graphics library that supports vector graphics and image compositing that can be used with GTK. -GDK does not wrap the Cairo API; instead it allows to create Cairo -drawing contexts which can be used to draw on [class@Gdk.Surface]s. +GDK does not wrap the Cairo API and it is not possible to use cairo directly +to draw on a [class@Gdk.Surface]. You can either use a +[GtkDrawingArea](../gtk4/class.DrawingArea.html) widget or +[gtk_snapshot_append_cairo](../gtk4/func.Snapshot.append_cairo.html) +for drawing with cairo in a GTK4 application. Additional functions allow use [struct@Gdk.Rectangle]s with Cairo and to use [struct@Gdk.RGBA], `GdkPixbuf`, and [class@Gdk.Surface]