mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
3c4729aaa2
Added 'pack type', intended for playtesting (random boosters/starters); Added 'default(_image)' property to ImageStyle, and added the frame fillers for magic; Added blurring and bold printing (rather hacky) to the text rendering functions (used for "double click to add image" text); Added 'symmetric overlay' combine mode, which will look really nice for hybrids; Moved the watermark choices from the game to an include file in magic-watermarks; Working on a replacement for the image scripting system that plays nicer with the rest of the code. In particular, it will be possible to compare generated images quickly, so they can be updated continuously. This is a work in progress, currently there are two versions of everything. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@327 0fc631ac-6414-0410-93d0-97cfa31319b6
44 lines
1.5 KiB
C++
44 lines
1.5 KiB
C++
//+----------------------------------------------------------------------------+
|
|
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
|
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
|
|
//| License: GNU General Public License 2 or later (see file COPYING) |
|
|
//+----------------------------------------------------------------------------+
|
|
|
|
#ifndef HEADER_RENDER_VALUE_IMAGE
|
|
#define HEADER_RENDER_VALUE_IMAGE
|
|
|
|
// ----------------------------------------------------------------------------- : Includes
|
|
|
|
#include <util/prec.hpp>
|
|
#include <render/value/viewer.hpp>
|
|
#include <data/field/image.hpp>
|
|
|
|
DECLARE_POINTER_TYPE(AlphaMask);
|
|
|
|
// ----------------------------------------------------------------------------- : ImageValueViewer
|
|
|
|
/// Viewer that displays an image value
|
|
class ImageValueViewer : public ValueViewer {
|
|
public:
|
|
DECLARE_VALUE_VIEWER(Image) : ValueViewer(parent,style) {}
|
|
|
|
virtual void draw(RotatedDC& dc);
|
|
|
|
virtual bool containsPoint(const RealPoint& p) const;
|
|
|
|
virtual void onValueChange();
|
|
virtual void onStyleChange();
|
|
|
|
private:
|
|
Bitmap bitmap;
|
|
mutable AlphaMaskP alpha_mask;
|
|
|
|
void loadMask(const Rotation& rot) const;
|
|
|
|
/// Generate a placeholder image
|
|
static Bitmap imagePlaceholder(const Rotation& rot, UInt w, UInt h, const Image& background, bool editing);
|
|
};
|
|
|
|
// ----------------------------------------------------------------------------- : EOF
|
|
#endif
|