Browse Source

Merge branch 'develop' into cairo

pull/105/head
Filipe Coelho GitHub 7 years ago
parent
commit
4f78f426aa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 6 deletions
  1. +1
    -1
      dgl/Makefile
  2. +2
    -0
      dgl/Window.hpp
  3. +8
    -1
      dgl/src/WidgetPrivateData.cpp
  4. +5
    -0
      dgl/src/Window.cpp
  5. +1
    -1
      utils/png2c.py
  6. +6
    -3
      utils/png2rgba.py

+ 1
- 1
dgl/Makefile View File

@@ -89,7 +89,7 @@ all: $(TARGETS)
# Compat name, to be removed soon
../build/libdgl.a: ../build/libdgl-opengl.a
@echo "Symlinking libdgl.a"
@ln -s $< $@
@ln -sf $< $@

# ---------------------------------------------------------------------------------------------------------------------



+ 2
- 0
dgl/Window.hpp View File

@@ -92,6 +92,8 @@ public:
bool openFileBrowser(const FileBrowserOptions& options);
#endif

bool isEmbed() const noexcept;

bool isVisible() const noexcept;
void setVisible(bool yesNo);



+ 8
- 1
dgl/src/WidgetPrivateData.cpp View File

@@ -16,6 +16,9 @@

#include "WidgetPrivateData.hpp"

#ifdef DGL_CAIRO
# include "../Cairo.hpp"
#endif
#ifdef DGL_OPENGL
# include "../OpenGL.hpp"
#endif
@@ -81,12 +84,16 @@ void Widget::PrivateData::display(const uint width,
cairo_matrix_t matrix;
cairo_get_matrix(cr, &matrix);
cairo_translate(cr, absolutePos.getX(), absolutePos.getY());
// TODO: scaling with cairo
// TODO: scaling and cropping
#endif

// display widget
self->onDisplay();

#ifdef DGL_CAIRO
cairo_set_matrix(cr, &matrix);
#endif

#ifdef DGL_OPENGL
if (needsDisableScissor)
{


+ 5
- 0
dgl/src/Window.cpp View File

@@ -1281,6 +1281,11 @@ bool Window::openFileBrowser(const FileBrowserOptions& options)
}
#endif

bool Window::isEmbed() const noexcept
{
return pData->fUsingEmbed;
}

bool Window::isVisible() const noexcept
{
return pData->fVisible;


+ 1
- 1
utils/png2c.py View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# DISTRHO Plugin Framework (DPF)


+ 6
- 3
utils/png2rgba.py View File

@@ -1,8 +1,8 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# DISTRHO Plugin Framework (DPF)
# Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2012-2019 Filipe Coelho <falktx@falktx.com>
#
# Permission to use, copy, modify, and/or distribute this software for any purpose with
# or without fee is hereby granted, provided that the above copyright notice and this
@@ -52,7 +52,10 @@ def png2rgba(namespace, filenames):
shortFilename = filename.rsplit(os.sep, 1)[-1].split(".", 1)[0]
shortFilename = shortFilename.replace("-", "_")

png = Image.open(filename)
png = Image.open(filename)
if png.getpalette():
png = png.convert()

pngNumpy = numpy.array(png)
pngData = pngNumpy.tolist()
#pngData.reverse()


Loading…
Cancel
Save