示例#1
0
文件: eh.cpp 项目: Chxnew/minix
  // CHECK-LABEL: define void @_ZN6test103fooEv()
  void foo() {
    A a; // force a cleanup context

    try {
    // CHECK:      invoke void @_ZN6test106opaqueEv()
      opaque();
    } catch (int i) {
    // CHECK:      call i8* @__cxa_begin_catch
    // CHECK-NEXT: bitcast
    // CHECK-NEXT: load i32*
    // CHECK-NEXT: store i32
    // CHECK-NEXT: call void @__cxa_end_catch() [[NUW:#[0-9]+]]
    } catch (B a) {
    // CHECK:      call i8* @__cxa_begin_catch
    // CHECK-NEXT: bitcast
    // CHECK-NEXT: bitcast
    // CHECK-NEXT: bitcast
    // CHECK-NEXT: call void @llvm.memcpy
    // CHECK-NEXT: invoke void @__cxa_end_catch()
    } catch (...) {
    // CHECK:      call i8* @__cxa_begin_catch
    // CHECK-NEXT: invoke void @__cxa_end_catch()
    }

    // CHECK: call void @_ZN6test101AD1Ev(
  }
示例#2
0
文件: main.cpp 项目: CCJY/coliru
int main()
{
    int array[100];
    for(int i=0; i<100; ++i){
       array[i] = 0;
    }
    opaque(array, array+100);
}
示例#3
0
 void foo() {
   A a;
   try {
     B str = b();
     opaque();
   } catch (int x) {
   }
 }
示例#4
0
Region CCTiledLayerImpl::visibleContentOpaqueRegion() const
{
    if (m_skipsDraw)
        return Region();
    if (opaque())
        return visibleContentRect();
    return m_tiler->opaqueRegionInContentRect(visibleContentRect());
}
示例#5
0
void QSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
{
    if ( !opaque() && e->button() == LeftButton ) {
	QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()));
	s->setRubberband( -1 );
	s->moveSplitter( pos, id() );
    }
}
示例#6
0
文件: uri.hpp 项目: mbits-os/libbase
	std::string authority() const
	{
		if (relative() || opaque())
			return std::string();

		auto start = m_schema + 3;
		return m_uri.substr(start, m_path - start);
	}
示例#7
0
文件: main.cpp 项目: CCJY/coliru
void funky(Base* b) {
    BaseVTableLayout const* vptr = b->vptr;
    inlinable(b); // statement A
    b->vptr = vptr; // inform LLVM that the function is not allowed to change the virtual pointer under our feet

    opaque(b); // Unknown implementation, LLVM assumes it may change the virtual pointer
    b->vptr = vptr; // inform LLVM that the function is not allowed to change the virtual pointer under our feet

    inlinable(b); // statement B
    b->vptr = vptr; // inform LLVM that the function is not allowed to change the virtual pointer under our feet
}
示例#8
0
int main(int argc, char *argv[])
{
    char buf[32];
    int n;

    scanf("%s", buf);
    n = strlen(buf);
    opaque(n);
    
    return 0;
}
示例#9
0
void ContentLayerChromium::createTextureUpdater(const CCLayerTreeHost* host)
{
#if USE(SKIA)
    if (host->settings().acceleratePainting)
        m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate));
    else if (host->settings().perTilePainting)
        m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate), host->layerRendererCapabilities().usingMapSub);
    else
#endif // USE(SKIA)
        m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_delegate), host->layerRendererCapabilities().usingMapSub);
    m_textureUpdater->setOpaque(opaque());
}
示例#10
0
文件: trapv.c 项目: C0deZLee/IntFlow
// CHECK: define void @test2()
void test2() {
  extern void opaque(int);
  opaque(++i);

  // CHECK:      [[T1:%.*]] = load i32* @i
  // CHECK-NEXT: [[T2:%.*]] = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 [[T1]], i32 1)
  // CHECK-NEXT: [[T3:%.*]] = extractvalue { i32, i1 } [[T2]], 0
  // CHECK-NEXT: [[T4:%.*]] = extractvalue { i32, i1 } [[T2]], 1
  // CHECK-NEXT: [[T5:%.*]] = xor i1 [[T4]], true
  // CHECK-NEXT: br i1 [[T5]]
  // CHECK:      call void @llvm.trap()
}
示例#11
0
 // CHECK: define void @_ZN6test113fooEv()
 void foo() {
   try {
     // CHECK:      invoke void @_ZN6test116opaqueEv()
     opaque();
   } catch (int**&p) {
     // CHECK:      [[EXN:%.*]] = load i8**
     // CHECK-NEXT: call i8* @__cxa_begin_catch(i8* [[EXN]]) nounwind
     // CHECK-NEXT: [[ADJ1:%.*]] = getelementptr i8* [[EXN]], i32 32
     // CHECK-NEXT: [[ADJ2:%.*]] = bitcast i8* [[ADJ1]] to i32***
     // CHECK-NEXT: store i32*** [[ADJ2]], i32**** [[P:%.*]]
     // CHECK-NEXT: call void @__cxa_end_catch() nounwind
   }
 }
示例#12
0
void QSplitterHandle::mouseMoveEvent( QMouseEvent *e )
{
    if ( !(e->state()&LeftButton) )
	return;
    QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()))
		 - mouseOffset;
    if ( opaque() ) {
	s->moveSplitter( pos, id() );
    } else {
	int min = pos; int max = pos;
	s->getRange( id(), &min, &max );
	s->setRubberband( QMAX( min, QMIN(max, pos )));
    }
}
示例#13
0
void ContentLayerChromium::createTextureUpdaterIfNeeded()
{
    if (m_textureUpdater)
        return;
    if (layerTreeHost()->settings().acceleratePainting)
        m_textureUpdater = FrameBufferSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_client));
    else if (CCSettings::perTilePaintingEnabled())
        m_textureUpdater = BitmapSkPictureCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_client));
    else
        m_textureUpdater = BitmapCanvasLayerTextureUpdater::create(ContentLayerPainter::create(m_client));
    m_textureUpdater->setOpaque(opaque());

    GC3Denum textureFormat = layerTreeHost()->rendererCapabilities().bestTextureFormat;
    setTextureFormat(textureFormat);
    setSampledTexelFormat(textureUpdater()->sampledTexelFormat(textureFormat));
}
示例#14
0
 // CHECK: define void @_ZN6test113barEv()
 void bar() {
   try {
     // CHECK:      [[EXNSLOT:%.*]] = alloca i8*
     // CHECK-NEXT: [[SELECTORSLOT:%.*]] = alloca i32
     // CHECK-NEXT: [[P:%.*]] = alloca [[A:%.*]]**,
     // CHECK-NEXT: [[TMP:%.*]] = alloca [[A]]*
     // CHECK-NEXT: invoke void @_ZN6test116opaqueEv()
     opaque();
   } catch (A*&p) {
     // CHECK:      [[EXN:%.*]] = load i8** [[EXNSLOT]]
     // CHECK-NEXT: [[ADJ1:%.*]] = call i8* @__cxa_begin_catch(i8* [[EXN]]) nounwind
     // CHECK-NEXT: [[ADJ2:%.*]] = bitcast i8* [[ADJ1]] to [[A]]*
     // CHECK-NEXT: store [[A]]* [[ADJ2]], [[A]]** [[TMP]]
     // CHECK-NEXT: store [[A]]** [[TMP]], [[A]]*** [[P]]
     // CHECK-NEXT: call void @__cxa_end_catch() nounwind
   }
 }
示例#15
0
void tst_QPixmap::transformed()
{
    QFETCH(QSize, size);
    QFETCH(QTransform, transform);
    QFETCH(Qt::TransformationMode, transformMode);

    QPixmap opaque(size);
    QPixmap transparent(size);
    opaque.fill(QColor(255, 0, 0));
    transparent.fill(QColor(255, 0, 0, 200));

    QPixmap transformed1;
    QPixmap transformed2;
    QBENCHMARK {
        transformed1 = opaque.transformed(transform, transformMode);
        transformed2 = transparent.transformed(transform, transformMode);
    }
}
示例#16
0
文件: Canvas.cpp 项目: jaaaaf/LK8000
void
Canvas::DrawClippedText(int x, int y, unsigned max_width, const TCHAR *text)
{
  static TCHAR text_buffer[256];
  assert(text != NULL);
#ifndef UNICODE
  assert(ValidateUTF8(text));
#endif
  const TCHAR *clipped_text = text;
  unsigned width = Canvas::CalcTextWidth(text);
  if (width > max_width) {
    #warning "that wrong, does not handle multibyte char."
    unsigned new_size;
    fixed target_percent = fixed(max_width) / fixed(width);
    new_size = fixed(StringLength(text)) * target_percent;
    CopyString(text_buffer, text, std::min(new_size, 256u));
    clipped_text = text_buffer;
  }
  
#ifndef UNICODE
  assert(ValidateUTF8(clipped_text));
#endif
  
  auto s = RenderText(font, clipped_text);
  if (s.data == nullptr)
    return;

  SDLRasterCanvas canvas(buffer);
  if (background_mode == OPAQUE) {
    OpaqueAlphaPixelOperations<ActivePixelTraits, GreyscalePixelTraits>
      opaque(canvas.Import(background_color), canvas.Import(text_color));
    canvas.CopyRectangle<decltype(opaque), GreyscalePixelTraits>
      (x, y, s.width, s.height,
       GreyscalePixelTraits::const_pointer_type(s.data),
       s.pitch, opaque);
  } else {
    ColoredAlphaPixelOperations<ActivePixelTraits, GreyscalePixelTraits>
      transparent(canvas.Import(text_color));
    canvas.CopyRectangle<decltype(transparent), GreyscalePixelTraits>
      (x, y, s.width, s.height,
       GreyscalePixelTraits::const_pointer_type(s.data),
       s.pitch, transparent);
  }
}
示例#17
0
void tst_QPixmap::scaled()
{
    QFETCH(QSize, size);
    QFETCH(QSize, scale);
    QFETCH(Qt::AspectRatioMode, ratioMode);
    QFETCH(Qt::TransformationMode, transformMode);

    QPixmap opaque(size);
    QPixmap transparent(size);
    opaque.fill(QColor(255, 0, 0));
    transparent.fill(QColor(255, 0, 0, 200));

    QPixmap scaled1;
    QPixmap scaled2;
    QBENCHMARK {
        scaled1 = opaque.scaled(scale, ratioMode, transformMode);
        scaled2 = transparent.scaled(scale, ratioMode, transformMode);
    }
}
示例#18
0
文件: Canvas.cpp 项目: jaaaaf/LK8000
void
Canvas::DrawText(int x, int y, const TCHAR *text)
{
  assert(text != nullptr);
#ifndef UNICODE
  assert(ValidateUTF8(text));
#endif

#ifdef ENABLE_OPENGL
  /*
   * RenderText return buffer owned by TextCache, this can be delete by GUI Thread
   *  lock is need for avoid to used alredy deleted buffer.
   */
  TextCache::Lock();
#endif
  
  auto s = RenderText(font, text);
  if (s.data != nullptr) {

    SDLRasterCanvas canvas(buffer);

    if (background_mode == OPAQUE) {
      OpaqueAlphaPixelOperations<ActivePixelTraits, GreyscalePixelTraits>
        opaque(canvas.Import(background_color), canvas.Import(text_color));
      canvas.CopyRectangle<decltype(opaque), GreyscalePixelTraits>
        (x, y, s.width, s.height,
         GreyscalePixelTraits::const_pointer_type(s.data),
         s.pitch, opaque);
    } else {
      ColoredAlphaPixelOperations<ActivePixelTraits, GreyscalePixelTraits>
        transparent(canvas.Import(text_color));
      canvas.CopyRectangle<decltype(transparent), GreyscalePixelTraits>
        (x, y, s.width, s.height,
         GreyscalePixelTraits::const_pointer_type(s.data),
         s.pitch, transparent);
    }
  }

#ifdef ENABLE_OPENGL  
  TextCache::Unlock();
#endif
}
// ----------------------------------------------------------------------------
// Sends the command to Widget launcher
// ----------------------------------------------------------------------------
//
static void HandleWidgetCommandL( 
    RApaLsSession& aSession, 
    const TDesC& aWidget,
    const TUid& aUid,
    TUint32 aOperation )
    {
    const TInt size( 2* aWidget.Length() + 3*sizeof( TUint32 ) );
    
    // Message format is <filenameLength><unicode_filename><someintegervalue>
    CApaCommandLine* cmd( CApaCommandLine::NewLC() );
    HBufC8* opaque( HBufC8::NewLC( size ) );
    
    RDesWriteStream stream;
    TPtr8 des( opaque->Des() );
    
    stream.Open( des );
    CleanupClosePushL( stream );
    
    // Generate the command.
    stream.WriteUint32L( aUid.iUid );
    stream.WriteUint32L( aWidget.Length() );
    stream.WriteL( reinterpret_cast< const TUint8* >( aWidget.Ptr() ),
                   aWidget.Size() );
    
    stream.WriteInt32L( aOperation );
    
    CleanupStack::PopAndDestroy( &stream );
    
    // Generate command.
    cmd->SetCommandL( EApaCommandBackgroundAndWithoutViews );
    cmd->SetOpaqueDataL( *opaque );    

    CleanupStack::PopAndDestroy( opaque );
    
    cmd->SetExecutableNameL( KLauncherApp );
    
    User::LeaveIfError( aSession.StartApp( *cmd ) );
    CleanupStack::PopAndDestroy( cmd );
    }
示例#20
0
static void *openScannerQrc(const unsigned short *filePath, const char *fileTags, int flags)
{
    Q_UNUSED(flags);
    Q_UNUSED(fileTags);
    QScopedPointer<OpaqQrc> opaque(new OpaqQrc);

#ifdef Q_OS_UNIX
    QString filePathS = QString::fromUtf16(filePath);
    opaque->fd = open(qPrintable(filePathS), O_RDONLY);
    if (opaque->fd == -1) {
        opaque->fd = 0;
        return 0;
    }

    struct stat s;
    int r = fstat(opaque->fd, &s);
    if (r != 0)
        return 0;
    opaque->mapl = s.st_size;

    void *map = mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, opaque->fd, 0);
    if (map == 0)
        return 0;
#else
    opaque->file = new QFile(QString::fromUtf16(filePath));
    if (!opaque->file->open(QFile::ReadOnly))
        return 0;

    uchar *map = opaque->file->map(0, opaque->file->size());
    if (!map)
        return 0;
#endif

    opaque->map = reinterpret_cast<char *>(map);
    opaque->xml = new QXmlStreamReader(opaque->map);

    return static_cast<void *>(opaque.take());
}
示例#21
0
/*!
    Sets the pixmap that will be used as the splash screen's image to
    \a pixmap.
*/
void QSplashScreen::setPixmap(const QPixmap &pixmap)
{
    Q_D(QSplashScreen);

    if (pixmap.hasAlpha()) {
        QPixmap opaque(pixmap.size());
        QPainter p(&opaque);
        p.fillRect(0, 0, pixmap.width(), pixmap.height(), palette().background());
        p.drawPixmap(0, 0, pixmap);
        p.end();
        d->pixmap = opaque;
    } else {
        d->pixmap = pixmap;
    }

    QRect r(0, 0, d->pixmap.size().width(), d->pixmap.size().height());
    resize(d->pixmap.size());
    move(QApplication::desktop()->screenGeometry().center() - r.center());
    if (!isVisible())
        d->drawContents();
    else
        repaint();
}
示例#22
0
Region CCLayerImpl::visibleContentOpaqueRegion() const
{
    if (opaque())
        return visibleLayerRect();
    return Region();
}
示例#23
0
PassOwnPtr<CCSharedQuadState> CCLayerImpl::createSharedQuadState() const
{
    IntRect layerClipRect;
    if (usesLayerClipping())
        layerClipRect = clipRect();
    return CCSharedQuadState::create(quadTransform(), drawTransform(), visibleLayerRect(), layerClipRect, drawOpacity(), opaque());
}
示例#24
0
 C::~C() { opaque(); }
示例#25
0
 C::C() { opaque(); }
示例#26
0
 void test2() {
   try {
     opaque();
   } catch (C&) {}
 }
示例#27
0
 void test1() throw(B) {
   opaque();
 }
示例#28
0
void nuiDrawContext::DrawShade(const nuiRect& rSourceRect, const nuiRect& rShadeRect, const nuiColor& rTint)
{
  bool texturing = mCurrentState.mTexturing;
  bool blending = mCurrentState.mBlending;
  nuiBlendFunc blendfunc;
  blendfunc = mCurrentState.mBlendFunc;

  if (!blending)
    EnableBlending(true);
  if (blendfunc != nuiBlendTransp)
    SetBlendFunc(nuiBlendTransp);

  nuiSize ShadeSize = rSourceRect.mLeft - rShadeRect.mLeft;

  nuiTexture* pShade = ::nuiTexture::GetTexture(nglString(_T("NUI_Shade_LUT")));

  if (!pShade)
  {
    // Left shadow
    const uint32 size = 16;
    uint8 pLUT[size * 4];
    uint i;
    for (i = 0; i<size; i++)
    {
      pLUT[0+(i*4)] = 0;
      pLUT[1+(i*4)] = 0;
      pLUT[2+(i*4)] = 0;
      float p = (float)i * (255.0f / (float)size);
      pLUT[3+(i*4)] = ToBelow(p);
    }

    nglImageInfo info(false);
    info.mBitDepth = 32;
    info.mBufferFormat = eImageFormatRaw;
    info.mBytesPerLine = size * 4;
    info.mBytesPerPixel = 4;
    info.mHeight = 1;
    info.mWidth = size;
    info.mpBuffer = (char*)pLUT;
    info.mPixelFormat = eImagePixelRGBA;

    pShade = nuiTexture::GetTexture(info, true);
    pShade->SetSource(_T("NUI_Shade_LUT"));

    NGL_ASSERT(pShade);

    pShade->SetMinFilter(GL_LINEAR);
    pShade->SetMagFilter(GL_LINEAR);
#ifndef _OPENGL_ES_
    pShade->SetWrapS(GL_CLAMP);
    pShade->SetWrapT(GL_CLAMP);
#else
    pShade->SetWrapS(GL_CLAMP_TO_EDGE);
    pShade->SetWrapT(GL_CLAMP_TO_EDGE);  
#endif
    pShade->SetEnvMode(GL_MODULATE);
  }

  nuiColor transp(rTint);
  nuiColor opaque(rTint);
  transp.Multiply(0.0f);
  opaque.Multiply(SHADE_ALPHA);

  if (!texturing)
    EnableTexturing(true);
  
  SetTexture(pShade);

  nuiRenderArray* pArray = new nuiRenderArray(GL_TRIANGLES);
  pArray->EnableArray(nuiRenderArray::eVertex);
  pArray->EnableArray(nuiRenderArray::eColor);
  pArray->EnableArray(nuiRenderArray::eTexCoord);
  pArray->Reserve(42);

  // Top Left:
  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  ///
  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetTexCoords(0, 0);
  pArray->SetColor(opaque);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  // Left
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom);
  pArray->PushVertex();

  ///
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  // Left Corner:
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  ///
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft-ShadeSize,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  // bottom shadow
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  ///
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mLeft,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  // Right Corner
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  ///
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom+ShadeSize);
  pArray->PushVertex();

  // Right
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();
  
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();
  
  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  ///
  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mBottom);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mBottom);
  pArray->PushVertex();

  // Top Right
  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(transp);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  ///
  pArray->SetColor(transp);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mTop);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(0, 0);
  pArray->SetVertex(rSourceRect.mRight+ShadeSize,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();

  pArray->SetColor(opaque);
  pArray->SetTexCoords(1, 0);
  pArray->SetVertex(rSourceRect.mRight,rSourceRect.mTop+ShadeSize);
  pArray->PushVertex();


  DrawArray(pArray);

  if (!texturing)
    EnableTexturing(false);

  if (!blending)
    EnableBlending(blending);
  
  if (blendfunc != nuiBlendTransp)
    SetBlendFunc(blendfunc);
}
示例#29
0
bool Image::opaque(const Point &pos)
{
    return opaque(pos.x(), pos.y());
}
示例#30
0
		color(uint8_t r,uint8_t g,uint8_t b, uint8_t a = opaque()) {
			this->r = r;
			this->g = g;
			this->b = b;
			this->a = a;
		}