Skip to content

Commit

Permalink
Merge pull request #137 from godardma/master
Browse files Browse the repository at this point in the history
Correction for Raster drawing (vertical flip)
  • Loading branch information
SimonRohou authored Dec 5, 2024
2 parents 54ce334 + a343638 commit 5ca7b32
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Binary file added client-api/C++/examples/VIBes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions client-api/C++/examples/all_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <vector>
#include <cmath>
#include <cstdlib>
#include <filesystem>

// Utility macro to log executed instructions on terminal
#define VIBES_TEST(instruction) \
Expand Down Expand Up @@ -301,11 +302,13 @@ int main()
}

vibes::drawPoints(x,y,vibesParams("FaceColor","red","EdgeColor","darkRed","Radius",100));


// vibes::newFigure("test Raster");
// vibes::drawRaster("./raster_example.png", 10, 5, 0.1, 0.1);
vibes::newFigure("test Raster");
vibes::drawRaster(std::filesystem::current_path().string()+"/../VIBes.png", 10, 5, 0.1, 0.1);

std::cout << "end drawing" << std::endl;

// Not needed anymore: VIBES_TEST( vibes::endDrawing() );

// Testing Vibes params system
Expand Down
2 changes: 1 addition & 1 deletion client-api/C++/src/vibes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is part of VIBes' C++ API
//
// Copyright (c) 2013-2015 Vincent Drevelle, Jeremy Nicola, Simon Rohou,
// Benoit Desrochers
// Benoit Desrochers, Maël Godard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion client-api/C++/src/vibes.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// \file vibes.h
/// \brief Vibes C++ API Header
/// \author Vincent Drevelle, Jeremy Nicola, Simon Rohou, Benoit Desrochers
/// \author Vincent Drevelle, Jeremy Nicola, Simon Rohou, Benoit Desrochers, Maël Godard
/// \date 2013-2015
/// \version 0.2.0beta
//
Expand Down
2 changes: 1 addition & 1 deletion viewer/vibesgraphicsitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ bool VibesGraphicsRaster::computeProjection(int dimX, int dimY)

}

QTransform transform(xres, 0, 0, yres, xlb, yub);
QTransform transform(xres, 0, 0, -yres, xlb, yub);
QGraphicsPixmapItem *pixmap_item = new QGraphicsPixmapItem(pixmap);

pixmap_item->setShapeMode(QGraphicsPixmapItem::MaskShape);
Expand Down

0 comments on commit 5ca7b32

Please sign in to comment.