Skip to content

Commit

Permalink
Update binary doodle to version 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rudy-digipen committed Feb 12, 2021
1 parent 7b98805 commit 9e69b47
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 73 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# doodle-release

Version 0.1.0
Version 0.2.1

Binaries built with Visual Studio 2019 Version **`16.7.2`**
Binaries built with Visual Studio 2019 Version **`16.8.4`**

Make sure your version is not older than this.

## Documentation

View the [0.1.0 Documentation here](https://rudy-digipen.github.io/doodle-release/0.1.0/index.html).
View the [0.2.1 Documentation here](https://rudy-digipen.github.io/doodle-release/0.2.1/index.html).

## Install for Visual Studio 2019

Expand Down Expand Up @@ -44,3 +44,13 @@ int main(void)
}

```
## Notable Changes
- The doodle Image class can now be copied like normal objects.
* It is more flexible when it is created in a global scope, so debug builds shouldn't see any popups from OpenGL asserts.
* Got rid of the `Image::color` type. Now there is only one color type, which is `doodle::Color`
- lib files should be more forward compatible with future versions of Visual Studio now that we are no longer using the `/GL` flag _(We turned off whole program optimization)_. See [C++ binary compatibility between Visual Studio 2015, 2017, and 2019](https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017) for more related info.
- doodle internals no longer use the CS230 namespace name
* This was causing name conflicts with the current CS230 class code
Binary file modified doodle_development/bin/Debug/Win32/doodle.lib
Binary file not shown.
Binary file modified doodle_development/bin/Debug/Win32/doodle.pdb
Binary file not shown.
Binary file modified doodle_development/bin/Debug/x64/doodle.lib
Binary file not shown.
Binary file modified doodle_development/bin/Debug/x64/doodle.pdb
Binary file not shown.
Binary file modified doodle_development/bin/Release/Win32/doodle.lib
Binary file not shown.
Binary file modified doodle_development/bin/Release/x64/doodle.lib
Binary file not shown.
79 changes: 10 additions & 69 deletions doodle_development/include/doodle/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include <filesystem>
#include <memory>

namespace doodle
{
Expand Down Expand Up @@ -82,43 +83,6 @@ namespace doodle
* must have already been called.
*/
Image();
/**
* \brief Destructor
*
* Release all image resources
*
* \warning This will likely fail if the instance is in a global scope because the GPU connection will have
* already been disconnected when the program shuts down.
*/
~Image();
/**
* \brief One cannot copy an Image object
*
* Images take up a lot of memory in your application and on the GPU, so we don't want to duplicate them.
*
*/
Image(const Image&) = delete;
/**
* \brief One cannot copy an Image object
*
* Images take up a lot of memory in your application and on the GPU, so we don't want to duplicate them.
*
*/
Image& operator=(const Image&) = delete;
/**
* \brief Image can be moved
*
* Since move resources around doesn't duplicate them, it is okay to move them with r-value references.
*
*/
Image(Image && other) noexcept;
/**
* \brief Image can be moved
*
* Since move resources around doesn't duplicate them, it is okay to move them with r-value references.
*
*/
Image& operator=(Image&& other) noexcept;

/**
* \brief Lists all of the supported image file formats
Expand Down Expand Up @@ -167,29 +131,6 @@ namespace doodle
*/
bool IsSmooth() const noexcept;

/**
* \brief struct to represent the colors of the Image.
*/
struct color
{
using byte = unsigned char;
byte red = 0, green = 0, blue = 0, alpha = 255;

/**
* \brief Defaults to black
*/
color() = default;
/**
* \brief Can be constructed from a Color object
* \param c Color object
*/
color(const doodle::Color& c) noexcept;
/**
* \brief Can be implicitly converted to a Color object
*/
operator doodle::Color() const noexcept;
};

/**
* \brief Get a specific color from the image
* \param index Should be 0 \f$\leq\f$ index \f$<\f$ GetNumberOfColors()
Expand All @@ -198,7 +139,7 @@ namespace doodle
*
*
*/
color operator[](int index) const;
Color operator[](int index) const;
/**
* \brief Get a specific color from the image, so that you can change the image contents.
* Usage of this will trigger creating a new GPU texture when the Image is drawn via draw_image().
Expand All @@ -208,7 +149,7 @@ namespace doodle
*
*
*/
color& operator[](int index);
Color& operator[](int index);

/**
* \brief Get a specific color from the image
Expand All @@ -219,7 +160,7 @@ namespace doodle
*
*
*/
color operator()(int column, int row) const;
Color operator()(int column, int row) const;
/**
* \brief Get a specific color from the image, so that you can change the image contents.
* Usage of this will trigger creating a new GPU texture when the Image is drawn via draw_image().
Expand All @@ -230,7 +171,7 @@ namespace doodle
*
*
*/
color& operator()(int column, int row);
Color& operator()(int column, int row);

/**
* \brief Returns an iterator to the first color of the Image.
Expand All @@ -244,14 +185,14 @@ namespace doodle
*
*
*/
color* begin();
Color* begin();
/**
* \brief
* \return
*
*
*/
color* end();
Color* end();

/**
* \brief Returns a const iterator to the first color of the Image.
Expand All @@ -263,7 +204,7 @@ namespace doodle
*
*
*/
const color* begin() const;
const Color* begin() const;
/**
* \brief Returns a const iterator to the color following the last color of the Image.
*
Expand All @@ -276,11 +217,11 @@ namespace doodle
*
*
*/
const color* end() const;
const Color* end() const;

private:
class ImageImpl;
std::unique_ptr<ImageImpl> impl;
std::shared_ptr<ImageImpl> impl{};

private:
friend void draw_image(const Image& image, double x, double y) noexcept;
Expand Down
2 changes: 1 addition & 1 deletion doodle_development/include/doodle/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@

namespace doodle
{
constexpr auto VERSION = "0.1.0";
constexpr auto VERSION = "0.2.1";
}

0 comments on commit 9e69b47

Please sign in to comment.