Mercurial > hg > orthanc-stone
comparison Applications/Sdl/SdlCairoSurface.cpp @ 560:aaeec7be8fb7
add support for alpha channel in CairoSurface
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 Apr 2019 17:57:50 +0200 |
parents | b70e9be013e4 |
children | 4f2416d519b4 |
comparison
equal
deleted
inserted
replaced
559:9e61b0ac12f1 | 560:aaeec7be8fb7 |
---|---|
49 { | 49 { |
50 if (cairoSurface_.get() == NULL || | 50 if (cairoSurface_.get() == NULL || |
51 cairoSurface_->GetWidth() != width || | 51 cairoSurface_->GetWidth() != width || |
52 cairoSurface_->GetHeight() != height) | 52 cairoSurface_->GetHeight() != height) |
53 { | 53 { |
54 cairoSurface_.reset(new CairoSurface(width, height)); | 54 cairoSurface_.reset(new CairoSurface(width, height, false /* no alpha */)); |
55 | 55 |
56 // TODO Big endian? | 56 // TODO Big endian? |
57 static const uint32_t rmask = 0x00ff0000; | 57 static const uint32_t rmask = 0x00ff0000; |
58 static const uint32_t gmask = 0x0000ff00; | 58 static const uint32_t gmask = 0x0000ff00; |
59 static const uint32_t bmask = 0x000000ff; | 59 static const uint32_t bmask = 0x000000ff; |