Lines Matching defs:psize
80 static GdkPixbuf* renderup( gchar const* name, Inkscape::IconSize lsize, unsigned psize );
83 static GdkPixbuf *loadPixmap(gchar const *name, unsigned lsize, unsigned psize);
84 static GdkPixbuf *loadSvg(std::list<Glib::ustring> const &names, GtkIconSize lsize, unsigned psize);
93 static bool prerenderIcon(gchar const *name, GtkIconSize lsize, unsigned psize);
98 unsigned psize, unsigned &stride);
170 icon->psize = 0;
189 icon->psize = 0;
205 int const size = ( icon->psize
206 ? icon->psize
336 icon->psize = getPhysSize(icon->lsize);
337 icon->pb = renderup(icon->name, icon->lsize, icon->psize);
342 GdkPixbuf* IconImpl::renderup( gchar const* name, Inkscape::IconSize lsize, unsigned psize ) {
347 pb = gtk_icon_theme_load_icon(theme, name, psize, (GtkIconLookupFlags) 0, NULL);
359 pb = loadSvg( names, Inkscape::getRegisteredIconSize(lsize), psize );
363 gtk_icon_theme_add_builtin_icon(name, psize, pb);
367 pb = loadPixmap( name, lsize, psize );
542 static Glib::ustring icon_cache_key(Glib::ustring const &name, unsigned psize);
837 int psize = getPhysSize(lsize);
838 // std::cout << " name: " << name << " size: " << psize << std::endl;
839 prerenderIcon(name, mappedSize, psize);
857 icon->psize = getPhysSize(lsize);
874 int psize = IconImpl::getPhysSize(lsize);
875 return IconImpl::renderup(name, lsize, psize);
1064 GdkPixbuf *IconImpl::loadPixmap(gchar const *name, unsigned /*lsize*/, unsigned psize)
1100 if ( ( static_cast<unsigned>(gdk_pixbuf_get_width(pb)) != psize )
1101 || ( static_cast<unsigned>(gdk_pixbuf_get_height(pb)) != psize ) ) {
1102 GdkPixbuf *spb = gdk_pixbuf_scale_simple(pb, psize, psize, GDK_INTERP_HYPER);
1127 gchar const *name, unsigned psize,
1170 if (block != static_cast<int>(psize) ) {
1174 sf = (double)psize / (double)block;
1193 Geom::IntPoint pdim(psize, psize);
1195 //dx = (psize - width) / 2;
1196 //dy = (psize - height) / 2;
1197 dx=dy=psize;
1198 dx=(dx-width)/2; // watch out for psize, since 'unsigned'-'signed' can cause problems if the result is negative
1209 stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, psize);
1212 px = g_new(guchar, stride * psize);
1213 memset(px, 0x00, stride * psize);
1217 CAIRO_FORMAT_ARGB32, psize, psize, stride);
1224 convert_pixels_argb32_to_pixbuf(px, psize, psize, stride);
1227 IconImpl::overlayPixels( px, psize, psize, stride, 0x00, 0x00, 0xff );
1261 Glib::ustring icon_cache_key(Glib::ustring const & name, unsigned psize)
1265 key += psize;
1295 unsigned psize, unsigned &stride)
1329 px = sp_icon_doc_icon( info->doc, info->drawing, it->c_str(), psize, stride );
1337 static void addToIconSet(GdkPixbuf* pb, gchar const* name, GtkIconSize lsize, unsigned psize) {
1341 Gtk::IconTheme::add_builtin_icon( name, psize, Glib::wrap(pb) );
1344 g_message(" set in a builtin for %s:%d:%d", name, lsize, psize);
1359 int psize = IconImpl::getPhysSize(lsize);
1361 IconImpl::prerenderIcon(name.c_str(), mappedSize, psize);
1367 static std::string getDestDir( unsigned psize )
1369 if ( sizePaths.find(psize) == sizePaths.end() ) {
1370 gchar *tmp = g_strdup_printf("%dx%d", psize, psize);
1371 sizePaths[psize] = tmp;
1375 return sizePaths[psize];
1379 bool IconImpl::prerenderIcon(gchar const *name, GtkIconSize lsize, unsigned psize)
1391 Glib::ustring key = icon_cache_key(name, psize);
1397 g_message("prerenderIcon [%s] %d:%d", name, lsize, psize);
1405 std::string subpart = getDestDir(psize);
1422 addToIconSet(obj, name, lsize, psize);
1448 g_message("load_svg_pixels([%s] = %s, %d, %d)", name, legacyNames[name].c_str(), lsize, psize);
1452 guchar* px = load_svg_pixels(names, psize, stride);
1455 psize, psize, stride,
1458 addToIconSet(pb, name, lsize, psize);
1480 g_message("prerenderIcon [%s] %d NOT!!!!!!", name, psize);
1486 GdkPixbuf *IconImpl::loadSvg(std::list<Glib::ustring> const &names, GtkIconSize lsize, unsigned psize)
1488 Glib::ustring key = icon_cache_key(*names.begin(), psize);
1494 guchar *px = load_svg_pixels(names, psize, stride);
1497 psize, psize, stride,
1500 addToIconSet(pb, names.begin()->c_str(), lsize, psize);
1602 int psize = getPhysSize(single._lsize);
1603 workDone = prerenderIcon(single._name.c_str(), single._lsize, psize);
1623 int psize = getPhysSize(lsize);
1624 g_message("imageMapCB(%p) for [%s]:%d:%d", widget, id, lsize, psize);
1627 prerenderIcon(id, lsize, psize);
1629 g_message(" prerender for %s:%d:%d", id, lsize, psize);
1631 int psize = getPhysSize(size);
1632 prerenderIcon(id, size, psize);
1664 int psize = getPhysSize(iconSize);
1665 prerenderIcon(iconName_two, iconSize, psize);