void X11WindowedBackend::createCursor(const QImage &img, const QPoint &hotspot) { const xcb_pixmap_t pix = xcb_generate_id(m_connection); const xcb_gcontext_t gc = xcb_generate_id(m_connection); const xcb_cursor_t cid = xcb_generate_id(m_connection); xcb_create_pixmap(m_connection, 32, pix, m_screen->root, img.width(), img.height()); xcb_create_gc(m_connection, gc, pix, 0, nullptr); xcb_put_image(m_connection, XCB_IMAGE_FORMAT_Z_PIXMAP, pix, gc, img.width(), img.height(), 0, 0, 0, 32, img.byteCount(), img.constBits()); XRenderPicture pic(pix, 32); xcb_render_create_cursor(m_connection, cid, pic, hotspot.x(), hotspot.y()); for (auto it = m_windows.constBegin(); it != m_windows.constEnd(); ++it) { xcb_change_window_attributes(m_connection, (*it).window, XCB_CW_CURSOR, &cid); } xcb_free_pixmap(m_connection, pix); xcb_free_gc(m_connection, gc); if (m_cursor) { xcb_free_cursor(m_connection, m_cursor); } m_cursor = cid; xcb_flush(m_connection); markCursorAsRendered(); }
void fillColors(QComboBox *cb) { // string id : "wbgrcmylenuqphkWBGRCMYLENUQPH" QPixmap pic(16,16); cb->addItem(QPixmap(none_xpm), QObject::tr("none or default")); pic.fill(QColor(255,255,255)); cb->addItem(pic, QObject::tr("w - white")); pic.fill(QColor(0,0,255)); cb->addItem(pic, QObject::tr("b - blue")); pic.fill(QColor(0,255,0)); cb->addItem(pic, QObject::tr("g - lime")); pic.fill(QColor(255,0,0)); cb->addItem(pic, QObject::tr("r - red")); pic.fill(QColor(0,255,255)); cb->addItem(pic, QObject::tr("c - cyan")); pic.fill(QColor(255,0,255)); cb->addItem(pic, QObject::tr("m - magenta")); pic.fill(QColor(255,255,0)); cb->addItem(pic, QObject::tr("y - yellow")); pic.fill(QColor(0,255,127)); cb->addItem(pic, QObject::tr("l - springgreen")); pic.fill(QColor(127,255,0)); cb->addItem(pic, QObject::tr("e - lawngreen")); pic.fill(QColor(0,127,255)); cb->addItem(pic, QObject::tr("n - skyblue")); pic.fill(QColor(127,0,255)); cb->addItem(pic, QObject::tr("u - blueviolet")); pic.fill(QColor(255,127,0)); cb->addItem(pic, QObject::tr("q - orange")); pic.fill(QColor(255,0,127)); cb->addItem(pic, QObject::tr("p - deeppink")); pic.fill(QColor(127,127,127)); cb->addItem(pic, QObject::tr("h - gray")); pic.fill(QColor(0,0,0)); cb->addItem(pic, QObject::tr("k - black")); pic.fill(QColor(179,179,179)); cb->addItem(pic, QObject::tr("W - lightgray")); pic.fill(QColor(0,0,127)); cb->addItem(pic, QObject::tr("B - navy")); pic.fill(QColor(0,127,0)); cb->addItem(pic, QObject::tr("G - green")); pic.fill(QColor(127,0,0)); cb->addItem(pic, QObject::tr("R - maroon")); pic.fill(QColor(0,127,127)); cb->addItem(pic, QObject::tr("C - teal")); pic.fill(QColor(127,0,127)); cb->addItem(pic, QObject::tr("M - purple")); pic.fill(QColor(127,127,0)); cb->addItem(pic, QObject::tr("Y - olive")); pic.fill(QColor(0,127,77)); cb->addItem(pic, QObject::tr("L - seagreen")); pic.fill(QColor(77,127,0)); cb->addItem(pic, QObject::tr("E - darklawn")); pic.fill(QColor(0,77,127)); cb->addItem(pic, QObject::tr("N - darkskyblue")); pic.fill(QColor(77,0,127)); cb->addItem(pic, QObject::tr("U - indigo")); pic.fill(QColor(127,77,0)); cb->addItem(pic, QObject::tr("Q - brown")); pic.fill(QColor(127,0,77)); cb->addItem(pic, QObject::tr("P - darkpink")); pic.fill(QColor(77,77,77)); cb->addItem(pic, QObject::tr("H - darkgray")); }
QPixmap SCPageLayout::thumbnail() const { static KIconLoader * loader = KIconLoader::global(); QSvgRenderer renderer; QSize size(80, 60); QPixmap pic(size); pic.fill(); QPainter p(&pic); QString file = loader->iconPath("layout-elements", KIconLoader::User); if (renderer.load(file)) { QList<SCPlaceholder *>::const_iterator it(m_placeholders.begin()); for (; it != m_placeholders.end(); ++it) { kDebug(33001) << "-----------------" <<(*it)->presentationObject() << (*it)->rect(size); renderer.render(&p, (*it)->presentationObject(), (*it)->rect(size)); } } else { kWarning(33001) << "could not load" << file; } return pic; }
int tool_main(int argc, char** argv) { SkAutoGraphics ag; if (argc < 2) { printf("Usage: pinspect [--dump-ops] filename [filename ...]\n"); return 1; } bool doDumpOps = false; int index = 1; if (!strcmp(argv[index], "--dump-ops")) { index += 1; doDumpOps = true; } for (; index < argc; ++index) { SkAutoTUnref<SkPicture> pic(inspect(argv[index])); if (doDumpOps) { dumpOps(pic); } if (index < argc - 1) { printf("\n"); } } return 0; }
QPixmap MultiLayer::canvasPixmap() { QSize size=canvas->size(); QPixmap pic(size.width(), size.height(), -1, QPixmap::BestOptim); pic.fill (Qt::white); QPainter paint; paint.begin(&pic); QwtPlotPrintFilter filter; filter.setOptions(QwtPlotPrintFilter::PrintAll | QwtPlotPrintFilter::PrintTitle | QwtPlotPrintFilter::PrintCanvasBackground); for (int i=0;i<(int)graphsList->count();i++) { Graph *gr=(Graph *)graphsList->at(i); Plot *myPlot= gr->plotWidget(); int lw = myPlot->lineWidth(); QRect rect = QRect(gr->x() + lw, gr->y() + lw, myPlot->width() - 2*lw, myPlot->height() - 2*lw); if (myPlot->paletteBackgroundColor() != QColor(white)) paint.fillRect(rect, myPlot->paletteBackgroundColor()); myPlot->print(&paint, rect, filter); if (lw > 0) myPlot->printFrame(&paint, rect); } paint.end(); return pic; }
Configurator::Configurator(QWidget *parent) : QFrame(parent), k(new Private) { k->framesCount = 1; k->currentFrame = 0; k->mode = TupToolPlugin::View; k->state = Manager; k->layout = new QBoxLayout(QBoxLayout::TopToBottom, this); k->layout->setAlignment(Qt::AlignHCenter | Qt::AlignTop); QLabel *toolTitle = new QLabel; toolTitle->setAlignment(Qt::AlignHCenter); QPixmap pic(THEME_DIR + "icons/opacity_tween.png"); toolTitle->setPixmap(pic.scaledToWidth(20, Qt::SmoothTransformation)); toolTitle->setToolTip(tr("Opacity Tween Properties")); k->layout->addWidget(toolTitle); k->layout->addWidget(new TSeparator(Qt::Horizontal)); k->settingsLayout = new QBoxLayout(QBoxLayout::TopToBottom); k->settingsLayout->setAlignment(Qt::AlignHCenter | Qt::AlignTop); k->settingsLayout->setMargin(0); k->settingsLayout->setSpacing(0); setTweenManagerPanel(); setButtonsPanel(); setPropertiesPanel(); k->layout->addLayout(k->settingsLayout); k->layout->addStretch(2); }
// Create a Sierpinkski-like picture that starts with a top row with a picture // that just contains a triangle. Subsequent rows take the prior row's picture, // shrinks it and replicates it 3 times then draws and appropriate number of // copies of it. static sk_sp<SkPicture> make_sierpinski_picture() { sk_sp<SkPicture> pic(make_tri_picture()); SkPictureRecorder recorder; SkRTreeFactory bbhFactory; SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), SkIntToScalar(kPicHeight), &bbhFactory); constexpr int kNumLevels = 4; for (int i = 0; i < kNumLevels; ++i) { canvas->save(); canvas->translate(kPicWidth/2 - (i+1) * (kTriSide/2.0f), 0.0f); for (int j = 0; j < i+1; ++j) { canvas->drawPicture(pic); canvas->translate(SkIntToScalar(kTriSide), 0); } canvas->restore(); pic = make_sub_picture(pic.get()); canvas->translate(0, 1.5f * kTriSide / kRoot3); } return recorder.finishRecordingAsPicture(); }
JpegWrap JpegReceiver::getNextFrame() { lockImage(); JpegWrap pic(currentPic.pic.get(), currentPic.length); releaseImage(); return pic; }
// Create a Sierpinkski-like picture that starts with a top row with a picture // that just contains a triangle. Subsequent rows take the prior row's picture, // shrinks it and replicates it 3 times then draws and appropriate number of // copies of it. static const SkPicture* make_sierpinski_picture() { SkAutoTUnref<const SkPicture> pic(make_tri_picture()); SkPictureRecorder recorder; SkRTreeFactory bbhFactory; SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth), SkIntToScalar(kPicHeight), &bbhFactory, SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag); static const int kNumLevels = 4; for (int i = 0; i < kNumLevels; ++i) { canvas->save(); canvas->translate(kPicWidth/2 - (i+1) * (kTriSide/2.0f), 0.0f); for (int j = 0; j < i+1; ++j) { canvas->drawPicture(pic); canvas->translate(SkIntToScalar(kTriSide), 0); } canvas->restore(); pic.reset(make_sub_picture(pic)); canvas->translate(0, 1.5f * kTriSide / kRoot3); } return recorder.endRecording(); }
QVariant PictureHelper::upload(QVariant url, QVariant path, QVariant window, QVariant maxsize) { m_window = window; QString filepath = path.toString(); QFileInfo fileinfo(filepath); if (fileinfo.size()/1024 > maxsize.toInt()) { //Scale image to fit maxsize QImage pic(filepath); int width = pic.width() * maxsize.toInt() * 1.5 / (fileinfo.size()/1024.) ; filepath += ".scaled." + fileinfo.suffix(); QImage scpic = pic.scaledToWidth(width); scpic.save(filepath); } QString mime = "image/jpeg"; if (fileinfo.suffix() == "png") { mime = "image/png"; }; FormPost *formPost = new FormPost("nelisquare"); formPost->setFile("photo", filepath, mime); formPost->setNetworkAccessManager(manager); QNetworkReply *reply = formPost->postData(url.toString()); formPost->setParent(reply); return QVariant(true); }
wxBitmap EffectRack::CreateBitmap(const char *xpm[], bool up, bool pusher) { wxMemoryDC dc; wxBitmap pic(xpm); wxBitmap mod(pic.GetWidth() + 6, pic.GetHeight() + 6); dc.SelectObject(mod); #if defined( __WXGTK__ ) wxColour newColour = wxSystemSettings::GetColour( wxSYS_COLOUR_BACKGROUND ); #else wxColour newColour = wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ); #endif dc.SetBackground(wxBrush(newColour)); dc.Clear(); int offset = 3; if (pusher) { if (!up) { offset += 1; } } dc.DrawBitmap(pic, offset, offset, true); dc.SelectObject(wxNullBitmap); return mod; }
void Management::stopSimulation(QString simName){ int index = -1; for(int i = 0; i < simCount; i++){ if(allSimulations.at(i)->getName().compare(simName) == 0){ index = i; } } if(index != -1){ Simulation * toRun = allSimulations.at(index); QStringList* slaves = toRun->getSlaves(); QStringList* builds = toRun->getBuilds(); QStringList* args = toRun->getArgs(); for(int i = 0; i < slaves->size(); i++){ qDebug()<<slaves->at(i); QString myslave = slaves->at(i); int pos = myslave.length() - myslave.indexOf("-"); myslave.chop(pos); int id = myslave.toInt(); Machine *s = getMachineById(id); if(s != 0){ //s->runSim(builds->at(i),args->at(i)); qDebug()<<builds->at(i),args->at(i); } else{ QMessageBox *msb = new QMessageBox(); msb->setIcon(QMessageBox::Critical); QPixmap pic(":/images/images/ALogo.png"); msb->setWindowIcon(QIcon(pic)); msb->setText("Slave with ID "+QString::number(id)+" is not connected"); msb->show(); } } } }
GraphicNetNode::GraphicNetNode(NetNode* node, QGraphicsItem* parent) : QGraphicsObject(parent) { this->node = node; //addressText = node->getAddress().toString().c_str(); //hostnameText = node->getName(); addressText = new QGraphicsSimpleTextItem(node->getAddress().toString().c_str(), this); hostnameText = new QGraphicsSimpleTextItem(node->getName(), this); secondAddrsText = new QGraphicsSimpleTextItem(" ", this); QBrush blueBrush(Qt::blue); secondAddrsText->setBrush(blueBrush); QBrush brush(Qt::black); addressText->setBrush(brush); hostnameText->setBrush(brush); QPixmap pic(":/media/serverIcon"); icon = new QGraphicsPixmapItem(pic, this); //icon->scale(0.75, 0.75); addressText->setVisible(true); hostnameText->setVisible(true); icon->setVisible(true); QFont textFont; textFont.setPixelSize(20); addressText->setFont(textFont); hostnameText->setFont(textFont); secondAddrsText->setFont(textFont); updateAddress(); }
GraphicNetCloud::GraphicNetCloud(raw_address address, QList<GraphicNetNode*> nodes, QGraphicsItem* parent) : QGraphicsObject(parent) { this->address = address; this->nodes = nodes; addressText = new QGraphicsSimpleTextItem(address.toString().c_str(), this); QFont textFont; textFont.setPixelSize(20); addressText->setFont(textFont); QBrush brush(Qt::black); addressText->setBrush(brush); QPixmap pic(":/media/cloudIcon"); icon = new QGraphicsPixmapItem(pic, this); //icon->scale(0.75, 0.75); //QRectF bounds = boundingRect(); for(int i=0; i<nodes.size(); i++){ nodes[i]->setParentItem(this); } updatePositions(); }
int main() { Simple_window win(Point(100, 100), 640, 480, "q12_10"); Image pic(Point(0, 0), "../olympic.jpg"); win.attach(pic); win.wait_for_button(); }
QPixmap ExifPixmap::createPixmap(QString path) { ExifData *exifData = exif_data_new_from_file(path.toStdString().c_str()); int orientation = 0; if(exifData) { ExifByteOrder byteOrder = exif_data_get_byte_order(exifData); ExifEntry *exifEntry = exif_data_get_entry(exifData, EXIF_TAG_ORIENTATION); if(exifEntry) { orientation = exif_get_short(exifEntry->data, byteOrder); } exif_data_free(exifData); } QPixmap pic(path); /* 0th Row 0th Column 1 top left side 2 top right side 3 bottom right side 4 bottom left side 5 left side top 6 right side top 7 right side bottom 8 left side bottom */ QTransform t; switch(orientation) { // TODO : test flips case 1: break; case 2: t.scale(-1,1); break; case 3: t.rotate(180); break; case 4: t.rotate(180); t.scale(-1,1); break; case 5: t.rotate(90); t.scale(-1,1); break; case 6: t.rotate(90); break; case 7: t.rotate(-90); t.scale(-1,1); break; case 8: t.rotate(-90); break; default: break; } return pic.transformed(t); }
static void rerecord(const SkPicture& src, SkBBHFactory* bbhFactory) { SkPictureRecorder recorder; if (FLAGS_skr) { src.draw(recorder.EXPERIMENTAL_beginRecording(src.width(), src.height(), bbhFactory)); } else { src.draw(recorder.beginRecording(src.width(), src.height(), bbhFactory)); } SkAutoTUnref<SkPicture> pic(recorder.endRecording()); }
DialogPrint::DialogPrint(QWidget *parent) : QDialog(parent), ui(new Ui::DialogPrint) { ui->setupUi(this); QPixmap pic("../ACBC/Dialogs/blueprint.png"); this->ui->label_print->setPixmap(pic); }
Surface ShpFile::getSurfaceArray(const uint8_t tilesX, const uint8_t tilesY, const uint32_t *tiles) { uint8_t width, height; uint16_t index = getIndex(tiles[0]); _stream.seekg(_index.at(index).startOffset+3, std::ios::beg); width = _stream.getU16LE(); height = _stream.get(); for(uint32_t i = 1; i < tilesX*tilesY; i++) { _stream.seekg(_index.at(getIndex(tiles[i])).startOffset+2, std::ios::beg); if(_stream.get() != height || _stream.get() != width) { throw(Exception(LOG_ERROR, "ShpFile", "getSurfaceArray(): Not all pictures have the same size!")); } } Surface pic(width*tilesX, height*tilesY, 8, _palette); for(uint32_t j = 0; j < tilesY; j++) { for(uint32_t i = 0; i < tilesX; i++) { Surface imageOut = getSurface(getIndex(tiles[j*tilesX+i])); //Now we can copy line by line switch(getType(tiles[i])) { case TILE_NORMAL: for(int y = 0; y < height; y++) memcpy(reinterpret_cast<char*>(static_cast<uint8_t*>(pic)) + i*width + (y+j*height) * pic.pitch(), static_cast<uint8_t*>(imageOut) + y * width, width); break; case TILE_FLIPH: for(int y = 0; y < height; y++) memcpy(reinterpret_cast<char*>(static_cast<uint8_t*>(pic)) + i*width + (y+j*height) * pic.pitch(), static_cast<uint8_t*>(imageOut) + (height-1-y) * width, width); break; case TILE_FLIPV: for(int y = 0; y < height; y++) for(int x = 0; x < width; x++) *(reinterpret_cast<char*>(static_cast<uint8_t*>(pic)) + i*width + (y+j*height) * pic.pitch() + x) = *(static_cast<uint8_t*>(imageOut) + y * width + (width-1-x)); break; case TILE_ROTATE: for(int y = 0; y < height; y++) for(int x = 0; x < width; x++) *(reinterpret_cast<char*>(static_cast<uint8_t*>(pic)) + i*width + (y+j*height) * pic.pitch() + x) = *(static_cast<uint8_t*>(imageOut) + (height-1-y) * width + (width-1-x)); break; default: throw(Exception(LOG_ERROR, "ShpFile", "Invalid type for this parameter. Must be one of TILE_NORMAL, TILE_FLIPH, TILE_FLIPV or TILE_ROTATE!")); break; } } } return pic; }
void sendDesc::print() { if (isPrimCall()) { PrimDesc *pd= getPrimDescOfFirstInstruction(jump_addr(), true); lprintf("primitive: %s\n", pd->name()); return; } printIndent(); printLookupType(raw_lookupType()); LookupType l= lookupType(); if (isPerformLookupType(l)) { lprintf(": argc: %ld", arg_count()); } else { lprintf(": selector: "); selector()->print_real_oop(); } if (l & DelegateeStaticBit) { lprintf(": delegatee: "); delegatee()->print_real_oop(); } Indent++; printIndent(); lprintf("addr: %#lx", jump_addr()); if (Memory->code->contains(jump_addr())) { lprintf(" (nmethod %#lx)", nmethod::findNMethod(jump_addr())); } lprintf("; mask: "); printMask(mask()); lprintf("\n"); printIndent(); lprintf("dependency: "); dependency()->print(); lprintf("\n"); if (pic()) { printIndent(); lprintf("PIC: p ((CacheStub*)%#lx)->print()\n", pic()); } if (countStub()) { printIndent(); lprintf("count stub: p ((CountStub*)%#lx)->print()\n", countStub()); } Indent --; }
int main(){ const string pic_name = "dog"; Simple_window win(Point(100, 100), 640, 480, pic_name); Image pic(Point(200, 200), "../image1.jpg"); // 128×128の画像 Text t(Point(250, 340), pic_name); win.attach(pic); win.attach(t); win.wait_for_button(); }
void sendDesc::unlink() { CacheStub* s= pic(); if (s) unlink_pic(s); else { CountStub* cs= countStub(); if (cs) unlink_countStub(cs); else unlink_nmethod(); } }
void YardCustomer::OnChange(wxTreeEvent& event) { m_loading = true; custItemData * data = static_cast<custItemData *>(m_tree->GetItemData(event.GetItem())); if (!data) return; try { m_cust = wxGetApp().DB().CustomerGet(data->GetID()); } catch (YardDBException& e) { wxLogDebug(wxT("Error (customer not loaded): %s, %s"),e.what(), e.GetSQL().c_str()); return; } if (m_cust.GetPicLocal() != "") { wxImage pic(m_cust.GetPicLocal().c_str()); if (pic.Ok()) m_pic->SetBitmap(pic); else wxLogDebug(wxT("Bad image data (pic).")); } else m_pic->SetBitmap(wxImage("res/personal.png")); if (m_cust.GetSigLocal() != "") { wxImage sig(m_cust.GetSigLocal().c_str()); if (sig.Ok()) m_sig->SetBitmap(sig); else wxLogDebug(wxT("Bad image data (sig).")); } else m_sig->SetBitmap(wxNullBitmap); m_first->SetValue(m_cust.GetFirstName().c_str()); m_middle->SetValue(m_cust.GetMiddleName().c_str()); m_last->SetValue(m_cust.GetLastName().c_str()); m_address->SetValue(m_cust.GetAddress().c_str()); m_ccNum->SetValue(m_cust.GetCreditCardNumber().c_str()); m_ccName->SetValue(m_cust.GetCreditCardName().c_str()); m_ccExp->SetValue(m_cust.GetCreditCardExpiration().c_str()); m_phone->SetValue(m_cust.GetPhone().c_str()); wxString pos; pos.Printf(wxT("Customer Since: %s"), m_cust.GetSince().c_str()); m_custSince->SetLabel(pos); m_loading = false; }
void YardEmployee::OnChange(wxTreeEvent& event) { m_loading = true; empItemData * data = static_cast<empItemData *>(m_tree->GetItemData(event.GetItem())); if (!data) return; try { m_emp = wxGetApp().DB().EmployeeGet(data->GetID()); } catch (YardDBException& e) { wxLogDebug(wxT("Error (employee not loaded): %s, %s"),e.what(), e.GetSQL().c_str()); return; } if (m_emp.GetPicLocal() != "") { wxImage pic(m_emp.GetPicLocal().c_str()); if (pic.Ok()) m_pic->SetBitmap(pic); else wxLogDebug(wxT("Bad image data (pic).")); } else m_pic->SetBitmap(wxImage("res/ys_employee_128x128.png")); if (m_emp.GetSigLocal() != "") { wxImage sig(m_emp.GetSigLocal().c_str()); if (sig.Ok()) m_sig->SetBitmap(sig); else wxLogDebug(wxT("Bad image data (sig).")); } else m_sig->SetBitmap(wxNullBitmap); m_first->SetValue(m_emp.GetFirst().c_str()); m_middle->SetValue(m_emp.GetMiddle().c_str()); m_last->SetValue(m_emp.GetLast().c_str()); m_address->SetValue(m_emp.GetAddress().c_str()); m_id->SetValue(m_emp.GetIdS().c_str()); m_taxid->SetValue(m_emp.GetTaxIdS().c_str()); m_phone->SetValue(m_emp.GetPhone().c_str()); wxString pos; pos.Printf(wxT("Title: %s"), m_emp.GetACL().c_str()); m_position->SetLabel(pos); pos.Printf(wxT("Hire date: %s"), m_emp.GetSince().c_str()); m_hire->SetLabel(pos); m_loading = false; }
void sendDesc::extend(nmethod* nm, mapOop receiverMapOop, CountStub *cs_from_pic) { char *addr; bool isPerform= isPerformLookupType(raw_lookupType()); if ( PIC && !isPerform && (addr= jump_addr(), addr != lookupRoutine())) { // already has at least one nmethod linked to the send CacheStub* s= pic(); # if GENERATE_DEBUGGING_AIDS if (CheckAssertions) { assert(cs_from_pic==NULL, "discarding countStub?"); if (!s) { // turning monomorphic ic into PIC; PIC will carry dependencies assert(dependency()->notEmpty(), "shouldn't be empty"); // check for duplicate nmethod & rcvr map CountStub *oldcs= countStub(); nmethod *oldnm= oldcs ? oldcs->target() : nmethod::findNMethod(addr); assert( oldnm != nm || receiverMapOop != oldnm->key.receiverMapOop(), "already linked to this nmethod, why rebind?? (maybe I-cache did not get flushed)"); } } # endif s= s->extend(this, nm, receiverMapOop); assert(s, "should have a PIC now"); assert(dependency()->next == dependency()->prev, "more than one link"); } else { // first time we execute this send, or PICs disabled, or perform, or // rebinding after a PIC has been removed, or non-map related misses if (isPerform) NumberOfPerformMisses++; if (!PIC) { CacheStub *s= pic(); // remove existing PIC if (s) s->deallocate(); } rebind(nm, NULL, cs_from_pic); } MachineCache::flush_instruction_cache_for_debugging(); if (VerifyZoneOften) verify(); }
CBasicWater::CBasicWater() { glGenTextures(1, &texture); CBitmap pic(((CSmfReadMap*)readmap)->waterTexture); // create mipmapped texture glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); gluBuild2DMipmaps(GL_TEXTURE_2D,GL_RGBA8 ,pic.xsize, pic.ysize, GL_RGBA, GL_UNSIGNED_BYTE, pic.mem); displist=0; }
CDrawWater::CDrawWater() { glGenTextures(1, &texture); CBitmap pic("bitmaps\\ocean.jpg"); // create mipmapped texture glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); gluBuild2DMipmaps(GL_TEXTURE_2D,4 ,pic.xsize, pic.ysize, GL_RGBA, GL_UNSIGNED_BYTE, pic.mem); displist=0; }
static void rerecord(const SkPicture& src, SkBBHFactory* bbhFactory) { SkPictureRecorder recorder; if (FLAGS_skr) { src.playback(recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(), src.cullRect().height(), bbhFactory)); } else { src.playback(recorder. DEPRECATED_beginRecording(src.cullRect().width(), src.cullRect().height(), bbhFactory)); } SkAutoTUnref<SkPicture> pic(recorder.endRecording()); }
void AddBuild::showError(QString errorMessage, QString info){ QMessageBox *msb = new QMessageBox(); if(info.compare("error") == 0){ msb->setIcon(QMessageBox::Critical); } if(info.compare("inform") == 0){ msb->setIcon(QMessageBox::Information); } QPixmap pic(":/images/images/ALogo.png"); //msb->setIconPixmap(pic.scaled(50,50,Qt::IgnoreAspectRatio,Qt::FastTransformation)); msb->setWindowIcon(QIcon(pic)); msb->setText(errorMessage); msb->show(); }
DropZone::DropZone(QWidget *parent, MessageBroker *messageBroker) : QLabel(parent) { messageBroker_m = messageBroker; messageBroker_m->registerDropZone(this); QPixmap pic(AppInfo::DROP_ICON); QPixmap scaled=pic.scaled (AppInfo::DROP_ZONE_WIDTH, AppInfo::DROP_ZONE_HEIGHT, Qt::IgnoreAspectRatio, Qt::FastTransformation ); setPixmap(scaled); logPathList_m.clear(); setAcceptDrops(true); }