Cleaning window managers for consistency.

This commit is contained in:
James Grogan 2022-11-12 15:34:54 +00:00
parent 5d984aa61d
commit 392a2b7889
28 changed files with 452 additions and 325 deletions

View file

@ -14,8 +14,8 @@ public:
{
auto app = std::make_unique<GuiApplication>();
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->run();
return true;

View file

@ -9,13 +9,13 @@ int main()
unsigned width = 200;
unsigned height = 200;
unsigned numChannels = 3;
auto image = Image::Create(width, height);
image->SetNumChannels(numChannels);
auto image = Image<unsigned char>::Create(width, height);
image->setNumChannels(numChannels);
std::vector<unsigned char> data(image->GetBytesPerRow()*height, 0);
std::vector<unsigned char> data(image->getBytesPerRow()*height, 0);
for(unsigned jdx=0;jdx<height;jdx++)
{
const auto heightOffset = jdx*image->GetBytesPerRow();
const auto heightOffset = jdx*image->getBytesPerRow();
for(unsigned idx=0;idx<width*numChannels;idx+=numChannels)
{
const auto index = heightOffset + idx;
@ -24,7 +24,7 @@ int main()
data[index+2] = 0;
}
}
image->SetData(data);
image->setData(data);
PngWriter writer;
writer.SetPath("test.png");