1
ファイルから派生した画像を任意の(賢明な)スケールに拡大しようとしています。ぼかしなしのスケール面
問題は、それは自動的にそれをautoblurrsです。どのように修正/削除できますか?目的は、個々のピクセルを表示することです。
ご回答ありがとうございます。
編集:いくつかのコード、"draw"
イベントでトリガは、親がGtkDrawingArea
static gboolean
cb_event_draw (GtkWidget *obj, cairo_t *cr, gpointer data)
{
guint width, height;
width = gtk_widget_get_allocated_width (obj);
height = gtk_widget_get_allocated_height (obj);
_priv = ...; //some struct
// cairo_save (cr);
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
cairo_scale (cr, _priv->zoom, _priv->zoom);
cairo_set_source_surface (cr, _priv->image, 0., 0.);
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
cairo_pattern_set_filter (cr, CAIRO_FILTER_FAST); // no matter if this is there or not
// it does actually, matter, works with this:
// cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_FAST);
cairo_paint (cr);
// print some markers at defined locations
return FALSE;
}
あなたは例のスニペットを提供することはできますか? –