* Put the remaining libicon.a classes into the BPrivate::Icon namespace.

* Minor cleanup (like removing the extra blank line between the copyright and the
  header guard).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20507 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-04-02 09:08:57 +00:00
parent a073ba1aa8
commit 325a6253ce
74 changed files with 745 additions and 316 deletions
+10 -3
View File
@@ -1,20 +1,27 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef CANVAS_VIEW_H
#define CANVAS_VIEW_H
#include "Icon.h"
#include "Scrollable.h"
#include "StateView.h"
class BBitmap;
class IconRenderer;
namespace BPrivate {
namespace Icon {
class IconRenderer;
}
}
using namespace BPrivate::Icon;
enum {
SNAPPING_OFF = 0,
+7 -1
View File
@@ -19,7 +19,6 @@ class BMenuBar;
class BMenuItem;
class CanvasView;
class Document;
class Icon;
class IconObjectListView;
class IconEditorApp;
class IconView;
@@ -30,6 +29,13 @@ class StyleView;
class SwatchGroup;
class TransformerListView;
namespace BPrivate {
namespace Icon {
class Icon;
}
}
using namespace BPrivate::Icon;
class MultipleManipulatorState;
enum {
+15 -8
View File
@@ -1,22 +1,30 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef UTIL_H
#define UTIL_H
#include <GraphicsDefs.h>
class AddPathsCommand;
class AddStylesCommand;
class PathContainer;
class Style;
class StyleContainer;
class VectorPath;
namespace BPrivate {
namespace Icon {
class PathContainer;
class Style;
class StyleContainer;
class VectorPath;
}
}
using namespace BPrivate::Icon;
void new_style(rgb_color color, StyleContainer* container,
Style** style, AddStylesCommand** command);
@@ -24,5 +32,4 @@ void new_style(rgb_color color, StyleContainer* container,
void new_path(PathContainer* container, VectorPath** path,
AddPathsCommand** command, VectorPath* other = NULL);
#endif // UTIL_H
#endif // UTIL_H
+12 -8
View File
@@ -1,29 +1,33 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#include "Document.h"
#include <new>
#include <stdio.h>
#include <Entry.h>
#include "CommandStack.h"
#include "DocumentSaver.h"
#include "Icon.h"
#include "Selection.h"
#include <Entry.h>
#include <new>
#include <stdio.h>
using std::nothrow;
using namespace BPrivate::Icon;
// constructor
Document::Document(const char* name)
: RWLocker("document rw lock"),
fIcon(new (nothrow) ::Icon()),
fIcon(new (nothrow) BPrivate::Icon::Icon()),
fCommandStack(new (nothrow) ::CommandStack()),
fSelection(new (nothrow) ::Selection()),
@@ -80,7 +84,7 @@ Document::SetExportSaver(::DocumentSaver* saver)
// SetIcon
void
Document::SetIcon(::Icon* icon)
Document::SetIcon(BPrivate::Icon::Icon* icon)
{
if (fIcon == icon)
return;
+14 -7
View File
@@ -1,24 +1,31 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef DOCUMENT_H
#define DOCUMENT_H
#include <String.h>
#include "Observable.h"
#include "RWLocker.h"
#include <String.h>
struct entry_ref;
namespace BPrivate {
namespace Icon {
class Icon;
} // namespace Icon
} // namespace BPrivate
class CommandStack;
class DocumentSaver;
class Icon;
class Selection;
class Document : public RWLocker,
@@ -44,14 +51,14 @@ class Document : public RWLocker,
inline ::DocumentSaver* ExportSaver() const
{ return fExportSaver; }
void SetIcon(::Icon* icon);
inline ::Icon* Icon() const
void SetIcon(BPrivate::Icon::Icon* icon);
inline BPrivate::Icon::Icon* Icon() const
{ return fIcon; }
void MakeEmpty(bool includingSavers = true);
private:
::Icon* fIcon;
BPrivate::Icon::Icon* fIcon;
::CommandStack* fCommandStack;
::Selection* fSelection;
+14 -6
View File
@@ -1,22 +1,29 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef GRADIENT_CONTROL_H
#define GRADIENT_CONTROL_H
#include <View.h>
#if LIB_LAYOUT
#include <layout.h>
# include <layout.h>
#endif
namespace BPrivate {
namespace Icon {
class Gradient;
} // namespace Icon
} // namespace BPrivate
enum {
MSG_GRADIENT_CONTROL_FOCUS_CHANGED = 'gcfc',
};
@@ -54,8 +61,9 @@ class GradientControl :
virtual void FrameResized(float width, float height);
// GradientControl
void SetGradient(const ::Gradient* gradient);
::Gradient* Gradient() const
void SetGradient(const BPrivate::Icon::Gradient*
gradient);
BPrivate::Icon::Gradient* Gradient() const
{ return fGradient; }
void SetCurrentStop(const rgb_color& color);
@@ -73,7 +81,7 @@ class GradientControl :
float _OffsetFor(BPoint where) const;
void _UpdateCurrentColor() const;
::Gradient* fGradient;
BPrivate::Icon::Gradient* fGradient;
BBitmap* fGradientBitmap;
int32 fDraggingStepIndex;
int32 fCurrentStepIndex;
+11 -4
View File
@@ -1,20 +1,27 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef ICON_VIEW_H
#define ICON_VIEW_H
#include <View.h>
#include "Icon.h"
#include <View.h>
class BBitmap;
class IconRenderer;
namespace BPrivate {
namespace Icon {
class IconRenderer;
}
}
using namespace BPrivate::Icon;
class IconView : public BView,
public IconListener {
+12 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -8,20 +8,28 @@
#ifndef PATH_LIST_VIEW_H
#define PATH_LIST_VIEW_H
#include "ListViews.h"
#include "PathContainer.h"
class BMenu;
class BMenuItem;
namespace BPrivate {
namespace Icon {
class VectorPath;
class Shape;
class ShapeContainer;
}
}
class CommandStack;
class VectorPath;
class PathListItem;
class Selection;
class Shape;
class ShapeContainer;
class ShapePathListener;
using namespace BPrivate::Icon;
class PathListView : public SimpleListView,
public PathContainerListener {
public:
+10 -3
View File
@@ -1,24 +1,31 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef SHAPE_LIST_VIEW_H
#define SHAPE_LIST_VIEW_H
#include "ListViews.h"
#include "ShapeContainer.h"
class BMenu;
class BMenuItem;
class CommandStack;
class Shape;
class ShapeListItem;
class Selection;
namespace BPrivate {
namespace Icon {
class Shape;
}
}
using namespace BPrivate::Icon;
enum {
MSG_ADD_SHAPE = 'adsh',
};
+13 -6
View File
@@ -1,28 +1,35 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef STYLE_LIST_VIEW_H
#define STYLE_LIST_VIEW_H
#include "ListViews.h"
#include "StyleContainer.h"
class BMenu;
class BMenuItem;
class CommandStack;
class Selection;
class Shape;
class ShapeContainer;
class ShapeListener;
class ShapeStyleListener;
class Style;
class StyleListItem;
namespace BPrivate {
namespace Icon {
class Shape;
class ShapeContainer;
class ShapeListener;
class Style;
}
}
using namespace BPrivate::Icon;
class StyleListView : public SimpleListView,
public StyleContainerListener {
public:
+12 -5
View File
@@ -1,25 +1,32 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef STYLE_VIEW_H
#define STYLE_VIEW_H
#include <View.h>
#include "Observer.h"
#include <View.h>
class BMenu;
class BMenuField;
class CommandStack;
class CurrentColor;
class Gradient;
class GradientControl;
class Style;
namespace BPrivate {
namespace Icon {
class Gradient;
class Style;
}
}
using namespace BPrivate::Icon;
// TODO: write lock the document when changing something...
@@ -1,23 +1,29 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef TRANSFORMER_LIST_VIEW_H
#define TRANSFORMER_LIST_VIEW_H
#include "ListViews.h"
#include "Shape.h"
class BMenu;
class CommandStack;
class Transformer;
class TransformerItem;
class Selection;
namespace BPrivate {
namespace Icon {
class Transformer;
}
}
class TransformerListView : public SimpleListView,
public ShapeListener {
public:
+11 -2
View File
@@ -1,21 +1,30 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef EXPORTER_H
#define EXPORTER_H
#include <Entry.h>
#include <OS.h>
class BPositionIO;
class Document;
namespace BPrivate {
namespace Icon {
class Icon;
} // namespace Icon
} // namespace BPrivate
using namespace BPrivate::Icon;
class Exporter {
public:
Exporter();
+10 -1
View File
@@ -5,14 +5,23 @@
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef IMPORTER_H
#define IMPORTER_H
#include <SupportDefs.h>
namespace BPrivate {
namespace Icon {
class Icon;
} // namespace Icon
} // namespace BPrivate
using namespace BPrivate::Icon;
class Importer {
public:
Importer();
@@ -1,27 +1,34 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef FLAT_ICON_EXPORTER_H
#define FLAT_ICON_EXPORTER_H
#include "Exporter.h"
class BMessage;
class BNode;
class BPositionIO;
namespace BPrivate {
namespace Icon {
class Gradient;
class Icon;
class LittleEndianBuffer;
class PathContainer;
class ShapeContainer;
class StyleContainer;
class VectorPath;
} // namespace Icon
} // namespace BPrivate
#define PRINT_STATISTICS 1
#if PRINT_STATISTICS
@@ -1,25 +1,30 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef MESSAGE_EXPORTER_H
#define MESSAGE_EXPORTER_H
#include "Exporter.h"
class BMessage;
class BPositionIO;
class Icon;
class PathContainer;
class Shape;
class Style;
class StyleContainer;
class Transformer;
class VectorPath;
namespace BPrivate {
namespace Icon {
class Icon;
class PathContainer;
class Shape;
class Style;
class StyleContainer;
class Transformer;
class VectorPath;
}
}
class MessageExporter : public Exporter {
public:
@@ -1,22 +1,27 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef MESSAGE_IMPORTER_H
#define MESSAGE_IMPORTER_H
#include "Importer.h"
class BMessage;
class BPositionIO;
class Icon;
class PathContainer;
class ShapeContainer;
class StyleContainer;
namespace BPrivate {
namespace Icon {
class Icon;
class PathContainer;
class ShapeContainer;
class StyleContainer;
}
}
class MessageImporter : public Importer {
public:
@@ -41,15 +41,15 @@
#include "PathTokenizer.h"
class Icon;
class SVGImporter;
namespace BPrivate {
namespace Icon {
class Icon;
class Transformable;
}
}
using BPrivate::Icon::Transformable;
using namespace BPrivate::Icon;
namespace agg {
namespace svg {
@@ -1,28 +1,28 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef SVG_EXPORTER_H
#define SVG_EXPORTER_H
#include <String.h>
#include "Exporter.h"
class Gradient;
class Shape;
class Style;
#include <String.h>
namespace BPrivate {
namespace Icon {
class Gradient;
class Shape;
class Style;
class Transformable;
}
}
using BPrivate::Icon::Transformable;
using namespace BPrivate::Icon;
class SVGExporter : public Exporter {
public:
@@ -1,22 +1,25 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef SVG_GRADIENTS_H
#define SVG_GRADIENTS_H
#include <Message.h>
#include <String.h>
#include <agg_color_rgba.h>
#include <agg_trans_affine.h>
class Gradient;
#include <Message.h>
#include <String.h>
namespace BPrivate {
namespace Icon {
class Gradient;
}
}
namespace agg {
namespace svg {
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef ADD_PATHS_COMMAND_H
#define ADD_PATHS_COMMAND_H
#include "Command.h"
class VectorPath;
class PathContainer;
namespace BPrivate {
namespace Icon {
class VectorPath;
class PathContainer;
}
}
using namespace BPrivate::Icon;
class AddPathsCommand : public Command {
public:
@@ -1,18 +1,19 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef ADD_POINT_COMMAND_H
#define ADD_POINT_COMMAND_H
#include <Point.h>
#include "PathCommand.h"
#include <Point.h>
class AddPointCommand : public PathCommand {
public:
AddPointCommand(VectorPath* path,
@@ -1,20 +1,27 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef ADD_SHAPES_COMMAND_H
#define ADD_SHAPES_COMMAND_H
#include "Command.h"
class Shape;
class ShapeContainer;
class Selection;
namespace BPrivate {
namespace Icon {
class Shape;
class ShapeContainer;
}
}
using namespace BPrivate::Icon;
class AddShapesCommand : public Command {
public:
AddShapesCommand(
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef ADD_TRANSFORMERS_COMMAND_H
#define ADD_TRANSFORMERS_COMMAND_H
#include "Command.h"
class Shape;
class Transformer;
namespace BPrivate {
namespace Icon {
class Shape;
class Transformer;
}
}
using namespace BPrivate::Icon;
// TODO: make a templated "add items" command?
@@ -1,24 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef FREEZE_TRANSFORMATION_COMMAND_H
#define FREEZE_TRANSFORMATION_COMMAND_H
#include "Command.h"
class Shape;
namespace BPrivate {
namespace Icon {
class Shape;
class Transformable;
}
}
using BPrivate::Icon::Transformable;
using namespace BPrivate::Icon;
class FreezeTransformationCommand : public Command {
public:
@@ -1,20 +1,25 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <[email protected]>
*/
#ifndef MOVE_SHAPES_COMMAND_H
#define MOVE_SHAPES_COMMAND_H
#include "Command.h"
// TODO: make a templated "move items" command?
class VectorPath;
class PathContainer;
namespace BPrivate {
namespace Icon {
class VectorPath;
class PathContainer;
}
}
using namespace BPrivate::Icon;
class MovePathsCommand : public Command {
public:
@@ -1,20 +1,26 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef MOVE_SHAPES_COMMAND_H
#define MOVE_SHAPES_COMMAND_H
#include "Command.h"
// TODO: make a templated "move items" command?
class Shape;
class ShapeContainer;
namespace BPrivate {
namespace Icon {
class Shape;
class ShapeContainer;
}
}
using namespace BPrivate::Icon;
class MoveShapesCommand : public Command {
public:
@@ -5,16 +5,21 @@
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef MOVE_TRANSFORMERS_COMMAND_H
#define MOVE_TRANSFORMERS_COMMAND_H
#include "Command.h"
// TODO: make a templated "move items" command?
class Shape;
class Transformer;
namespace BPrivate {
namespace Icon {
class Shape;
class Transformer;
}
}
using namespace BPrivate::Icon;
class MoveTransformersCommand : public Command {
public:
@@ -1,21 +1,26 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef NUDGE_POINTS_ACTION_H
#define NUDGE_POINTS_ACTION_H
#include <String.h>
#include "TransformCommand.h"
class VectorPath;
#include <String.h>
struct control_point;
namespace BPrivate {
namespace Icon {
class VectorPath;
struct control_point;
}
}
using namespace BPrivate::Icon;
class NudgePointsCommand : public TransformCommand {
public:
@@ -1,17 +1,23 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef PATH_COMMAND_H
#define PATH_COMMAND_H
#include "Command.h"
class VectorPath;
namespace BPrivate {
namespace Icon {
class VectorPath;
}
}
using namespace BPrivate::Icon;
class PathCommand : public Command {
public:
@@ -1,20 +1,26 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef REMOVE_PATHS_COMMAND_H
#define REMOVE_PATHS_COMMAND_H
#include <List.h>
#include "Command.h"
class VectorPath;
class PathContainer;
#include <List.h>
namespace BPrivate {
namespace Icon {
class VectorPath;
class PathContainer;
}
}
using namespace BPrivate::Icon;
class RemovePathsCommand : public Command {
public:
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef REMOVE_SHAPES_COMMAND_H
#define REMOVE_SHAPES_COMMAND_H
#include "Command.h"
class Shape;
class ShapeContainer;
namespace BPrivate {
namespace Icon {
class Shape;
class ShapeContainer;
}
}
using namespace BPrivate::Icon;
class RemoveShapesCommand : public Command {
public:
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef REMOVE_TRANSFORMERS_COMMAND_H
#define REMOVE_TRANSFORMERS_COMMAND_H
#include "Command.h"
class Shape;
class Transformer;
namespace BPrivate {
namespace Icon {
class Shape;
class Transformer;
}
}
using namespace BPrivate::Icon;
// TODO: make a templated "remove items" command?
@@ -1,26 +1,26 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORM_POINTS_COMMAND_H
#define TRANSFORM_POINTS_COMMAND_H
#include "TransformBox.h"
#include "TransformCommand.h"
class VectorPath;
struct control_point;
namespace BPrivate {
namespace Icon {
struct control_point;
class Transformable;
class VectorPath;
}
}
using BPrivate::Icon::Transformable;
using namespace BPrivate::Icon;
class TransformPointsCommand : public TransformCommand,
public TransformBoxListener {
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef UNASSIGN_PATH_COMMAND_H
#define UNASSIGN_PATH_COMMAND_H
#include "Command.h"
class Shape;
class VectorPath;
namespace BPrivate {
namespace Icon {
class Shape;
class VectorPath;
}
}
using namespace BPrivate::Icon;
class UnassignPathCommand : public Command {
public:
+10 -4
View File
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef ADD_STYLES_COMMAND_H
#define ADD_STYLES_COMMAND_H
#include "Command.h"
class Style;
class StyleContainer;
namespace BPrivate {
namespace Icon {
class Style;
class StyleContainer;
}
}
using namespace BPrivate::Icon;
class AddStylesCommand : public Command {
public:
@@ -1,20 +1,26 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef ASSIGN_STYLE_COMMAND_H
#define ASSIGN_STYLE_COMMAND_H
#include <InterfaceDefs.h>
#include "Command.h"
class Shape;
class Style;
#include <InterfaceDefs.h>
namespace BPrivate {
namespace Icon {
class Shape;
class Style;
}
}
using namespace BPrivate::Icon;
class AssignStyleCommand : public Command {
public:
@@ -1,20 +1,25 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef MOVE_STYLES_COMMAND_H
#define MOVE_STYLES_COMMAND_H
#include "Command.h"
// TODO: make a templated "move items" command?
class Style;
class StyleContainer;
namespace BPrivate {
namespace Icon {
class Style;
class StyleContainer;
}
}
using namespace BPrivate::Icon;
class MoveStylesCommand : public Command {
public:
@@ -1,20 +1,26 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef REMOVE_STYLES_COMMAND_H
#define REMOVE_STYLES_COMMAND_H
#include <List.h>
#include "Command.h"
class Style;
class StyleContainer;
#include <List.h>
namespace BPrivate {
namespace Icon {
class Style;
class StyleContainer;
}
}
using namespace BPrivate::Icon;
class RemoveStylesCommand : public Command {
public:
+10 -4
View File
@@ -1,19 +1,25 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef SET_COLOR_COMMAND_H
#define SET_COLOR_COMMAND_H
#include <InterfaceDefs.h>
#include "Command.h"
class Style;
#include <InterfaceDefs.h>
namespace BPrivate {
namespace Icon {
class Style;
}
}
using namespace BPrivate::Icon;
class SetColorCommand : public Command {
public:
@@ -1,18 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef SET_GRADIENT_COMMAND_H
#define SET_GRADIENT_COMMAND_H
#include "Command.h"
class Gradient;
class Style;
namespace BPrivate {
namespace Icon {
class Gradient;
class Style;
}
}
using namespace BPrivate::Icon;
class SetGradientCommand : public Command {
public:
@@ -1,19 +1,26 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORM_GRADIENT_BOX_H
#define TRANSFORM_GRADIENT_BOX_H
#include "TransformBox.h"
class CanvasView;
class Gradient;
class Shape;
namespace BPrivate {
namespace Icon {
class Gradient;
class Shape;
}
}
using namespace BPrivate::Icon;
class TransformGradientBox : public TransformBox {
public:
@@ -1,23 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORM_OBJECTS_COMMAND_H
#define TRANSFORM_OBJECTS_COMMAND_H
#include "TransformBox.h"
#include "TransformCommand.h"
namespace BPrivate {
namespace Icon {
class Transformable;
}
}
using BPrivate::Icon::Transformable;
using namespace BPrivate::Icon;
class TransformObjectsCommand : public TransformCommand,
public TransformBoxListener {
@@ -1,21 +1,27 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORM_POINTS_BOX_H
#define TRANSFORM_POINTS_BOX_H
#include "CanvasTransformBox.h"
class CanvasView;
class PathManipulator;
class VectorPath;
struct control_point;
namespace BPrivate {
namespace Icon {
class VectorPath;
struct control_point;
}
}
using namespace BPrivate::Icon;
class TransformPointsBox : public CanvasTransformBox {
public:
@@ -1,17 +1,23 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORM_SHAPES_BOX_H
#define TRANSFORM_SHAPES_BOX_H
#include "CanvasTransformBox.h"
class Shape;
namespace BPrivate {
namespace Icon {
class Shape;
}
}
using namespace BPrivate::Icon;
class TransformShapesBox : public CanvasTransformBox {
public:
+19 -10
View File
@@ -1,25 +1,31 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef ICON_H
#define ICON_H
#ifdef ICON_O_MATIC
#include <List.h>
# include "Observer.h"
# include "Referenceable.h"
#else
# include <SupportDefs.h>
#endif
#include "ShapeContainer.h"
#ifdef ICON_O_MATIC
# include <List.h>
# include "Observer.h"
# include "Referenceable.h"
#else
# include <SupportDefs.h>
#endif
class BRect;
namespace BPrivate {
namespace Icon {
class PathContainer;
class StyleContainer;
@@ -84,4 +90,7 @@ class Icon {
#endif
};
#endif // ICON_H
} // namespace Icon
} // namespace BPrivate
#endif // ICON_H
+12 -4
View File
@@ -1,14 +1,14 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef ICON_RENDERER_H
#define ICON_RENDERER_H
#include <agg_gamma_lut.h>
#include <agg_pixfmt_rgba.h>
#include <agg_rasterizer_compound_aa.h>
@@ -21,6 +21,11 @@
class BBitmap;
class BRect;
namespace BPrivate {
namespace Icon {
class Icon;
typedef agg::gamma_lut
@@ -61,7 +66,7 @@ class IconRenderer {
// used when no background bitmap
// is set
const ::GammaTable& GammaTable() const
const BPrivate::Icon::GammaTable& GammaTable() const
{ return fGammaTable; }
void Demultiply();
@@ -74,7 +79,7 @@ class IconRenderer {
agg::rgba8 fBackgroundColor;
const Icon* fIcon;
::GammaTable fGammaTable;
BPrivate::Icon::GammaTable fGammaTable;
RenderingBuffer fRenderingBuffer;
PixelFormat fPixelFormat;
@@ -91,4 +96,7 @@ class IconRenderer {
Transformation fGlobalTransform;
};
} // namespace Icon
} // namespace BPrivate
#endif // ICON_RENDERER_H
+5 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -7,6 +7,7 @@
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
*/
#include "IconUtils.h"
#include <new>
@@ -22,8 +23,11 @@
#include "IconRenderer.h"
#include "FlatIconImporter.h"
using namespace BPrivate::Icon;
using std::nothrow;
// GetIcon
status_t
BIconUtils::GetIcon(BNode* node,
+10 -1
View File
@@ -1,20 +1,26 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "FlatIconFormat.h"
#include "LittleEndianBuffer.h"
namespace BPrivate {
namespace Icon {
const uint32 FLAT_ICON_MAGIC = 'ficn';
const char* kVectorAttrNodeName = "BEOS:ICON";
const char* kVectorAttrMimeName = "META:ICON";
// read_coord
bool
read_coord(LittleEndianBuffer& buffer, float& coord)
@@ -119,3 +125,6 @@ write_float_24(LittleEndianBuffer& buffer, float _value)
&& buffer.Write((uint8)((shortValue >> 8) & 0xff))
&& buffer.Write((uint8)(shortValue & 0xff));
}
} // namespace Icon
} // namespace BPrivate
+10 -3
View File
@@ -1,16 +1,20 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef FLAT_ICON_FORMAT_H
#define FLAT_ICON_FORMAT_H
#include <SupportDefs.h>
namespace BPrivate {
namespace Icon {
extern const uint32 FLAT_ICON_MAGIC;
extern const char* kVectorAttrNodeName;
@@ -69,4 +73,7 @@ bool write_coord(LittleEndianBuffer& buffer, float coord);
bool read_float_24(LittleEndianBuffer& buffer, float& value);
bool write_float_24(LittleEndianBuffer& buffer, float value);
#endif // FLAT_ICON_FORMAT_H
} // namespace Icon
} // namespace BPrivate
#endif // FLAT_ICON_FORMAT_H
+12 -5
View File
@@ -1,22 +1,26 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef FLAT_ICON_IMPORTER_H
#define FLAT_ICON_IMPORTER_H
#ifdef ICON_O_MATIC
# include "Importer.h"
# include "Importer.h"
#else
# include <SupportDefs.h>
# include <SupportDefs.h>
#endif
class BMessage;
class BPositionIO;
namespace BPrivate {
namespace Icon {
class Icon;
class LittleEndianBuffer;
class PathContainer;
@@ -58,4 +62,7 @@ class FlatIconImporter {
ShapeContainer* shapes);
};
#endif // FLAT_ICON_IMPORTER_H
} // namespace Icon
} // namespace BPrivate
#endif // FLAT_ICON_IMPORTER_H
@@ -1,21 +1,25 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "LittleEndianBuffer.h"
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include "LittleEndianBuffer.h"
#include <ByteOrder.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace BPrivate::Icon;
#define CHUNK_SIZE 256
// constructor
LittleEndianBuffer::LittleEndianBuffer()
: fBuffer((uint8*)malloc(CHUNK_SIZE)),
+10 -3
View File
@@ -1,16 +1,20 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef LITTLE_ENDIAN_BUFFER_H
#define LITTLE_ENDIAN_BUFFER_H
#include <SupportDefs.h>
namespace BPrivate {
namespace Icon {
class LittleEndianBuffer {
public:
LittleEndianBuffer();
@@ -54,4 +58,7 @@ class LittleEndianBuffer {
bool fOwnsBuffer;
};
#endif // LITTLE_ENDIAN_BUFFER_H
} // namespace Icon
} // namespace BPrivate
#endif // LITTLE_ENDIAN_BUFFER_H
+11 -3
View File
@@ -1,17 +1,22 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef PATH_COMMAND_QUEUE_H
#define PATH_COMMAND_QUEUE_H
#include "LittleEndianBuffer.h"
class BPoint;
namespace BPrivate {
namespace Icon {
class VectorPath;
class PathCommandQueue {
@@ -50,4 +55,7 @@ class PathCommandQueue {
uint8 fCommandCount;
};
#endif // PATH_COMMAND_QUEUE_H
} // namespace Icon
} // namespace BPrivate
#endif // PATH_COMMAND_QUEUE_H
+10 -3
View File
@@ -1,16 +1,20 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef PATH_CONTAINER_H
#define PATH_CONTAINER_H
#include <List.h>
namespace BPrivate {
namespace Icon {
class VectorPath;
#ifdef ICON_O_MATIC
@@ -63,4 +67,7 @@ class PathContainer {
#endif // ICON_O_MATIC
};
#endif // PATH_CONTAINER_H
} // namespace Icon
} // namespace BPrivate
#endif // PATH_CONTAINER_H
+14 -7
View File
@@ -1,26 +1,30 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Copyright 2006-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef SHAPE_H
#define SHAPE_H
#include <List.h>
#include <Rect.h>
#ifdef ICON_O_MATIC
# include "IconObject.h"
# include "Observer.h"
# include "IconObject.h"
# include "Observer.h"
#endif
#include "PathContainer.h"
#include "PathSource.h"
#include "Transformable.h"
#include "VectorPath.h"
#include <List.h>
#include <Rect.h>
namespace BPrivate {
namespace Icon {
class Style;
#ifdef ICON_O_MATIC
@@ -159,4 +163,7 @@ class Shape : public BPrivate::Icon::Transformable {
#endif
};
#endif // SHAPE_H
} // namespace Icon
} // namespace BPrivate
#endif // SHAPE_H
+10 -3
View File
@@ -1,16 +1,20 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef SHAPE_CONTAINER_H
#define SHAPE_CONTAINER_H
#include <List.h>
namespace BPrivate {
namespace Icon {
class Shape;
#ifdef ICON_O_MATIC
@@ -63,4 +67,7 @@ class ShapeContainer {
#endif // ICON_O_MATIC
};
#endif // SHAPE_CONTAINER_H
} // namespace Icon
} // namespace BPrivate
#endif // SHAPE_CONTAINER_H
+15 -9
View File
@@ -5,28 +5,32 @@
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef VECTOR_PATH_H
#define VECTOR_PATH_H
#include "Transformable.h"
#include <agg_path_storage.h>
#include <Rect.h>
#include <String.h>
#include <agg_path_storage.h>
#include "Transformable.h"
#ifdef ICON_O_MATIC
# include <Archivable.h>
# include <List.h>
# include "IconObject.h"
# include "IconObject.h"
# include <Archivable.h>
# include <List.h>
#endif // ICON_O_MATIC
class BBitmap;
class BMessage;
class BView;
namespace BPrivate {
namespace Icon {
struct control_point {
BPoint point; // actual point on path
BPoint point_in; // control point for incomming curve
@@ -207,5 +211,7 @@ class VectorPath {
mutable BRect fCachedBounds;
};
#endif // VECTOR_PATH_H
} // namespace Icon
} // namespace BPrivate
#endif // VECTOR_PATH_H
+11 -5
View File
@@ -1,16 +1,13 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef GRADIENT_H
#define GRADIENT_H
#include <GraphicsDefs.h>
#include <List.h>
#ifdef ICON_O_MATIC
# include <Archivable.h>
@@ -20,8 +17,15 @@
#include "Transformable.h"
#include <GraphicsDefs.h>
#include <List.h>
class BMessage;
namespace BPrivate {
namespace Icon {
enum gradient_type {
GRADIENT_LINEAR = 0,
GRADIENT_CIRCULAR,
@@ -121,5 +125,7 @@ class Gradient : public Transformable {
bool fInheritTransformation;
};
} // namespace Icon
} // namespace BPrivate
#endif // GRADIENT_H
#endif // GRADIENT_H
+22 -12
View File
@@ -1,25 +1,29 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef STYLE_H
#define STYLE_H
#ifdef ICON_O_MATIC
# include "IconObject.h"
# include "Observer.h"
#endif
#include "IconRenderer.h"
// TODO: put GammaTable into its own file
#include <GraphicsDefs.h>
#include <agg_color_rgba.h>
#ifdef ICON_O_MATIC
# include "IconObject.h"
# include "Observer.h"
#endif
#include "IconRenderer.h"
// TODO: put GammaTable into its own file
namespace BPrivate {
namespace Icon {
class Gradient;
@@ -55,8 +59,9 @@ class Style {
inline rgb_color Color() const
{ return fColor; }
void SetGradient(const ::Gradient* gradient);
::Gradient* Gradient() const
void SetGradient(const BPrivate::Icon::Gradient*
gradient);
BPrivate::Icon::Gradient* Gradient() const
{ return fGradient; }
const agg::rgba8* Colors() const
@@ -67,7 +72,7 @@ class Style {
private:
rgb_color fColor;
::Gradient* fGradient;
BPrivate::Icon::Gradient* fGradient;
// hold gradient color array
agg::rgba8* fColors;
@@ -77,4 +82,9 @@ class Style {
mutable bool fGammaCorrectedColorsValid;
};
#endif // STYLE_H
} // namespace Icon
} // namespace BPrivate
using namespace BPrivate::Icon;
#endif // STYLE_H
+10 -3
View File
@@ -1,16 +1,20 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef STYLE_MANAGER_H
#define STYLE_MANAGER_H
#include <List.h>
namespace BPrivate {
namespace Icon {
class Style;
#ifdef ICON_O_MATIC
@@ -62,4 +66,7 @@ class StyleContainer {
#endif // ICON_O_MATIC
};
#endif // STYLE_MANAGER_H
} // namespace Icon
} // namespace BPrivate
#endif // STYLE_MANAGER_H
@@ -1,14 +1,13 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "AffineTransformer.h"
#include <new>
#include "AffineTransformer.h"
#ifdef ICON_O_MATIC
# include <Message.h>
@@ -18,9 +17,13 @@
# include "PropertyObject.h"
#endif
#include <new>
using namespace BPrivate::Icon;
using std::nothrow;
// constructor
AffineTransformer::AffineTransformer(VertexSource& source)
: Transformer(source, "Transformation"),
+11 -4
View File
@@ -1,18 +1,22 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef AFFINE_TRANSFORMER_H
#define AFFINE_TRANSFORMER_H
#include "Transformer.h"
#include <agg_conv_transform.h>
#include <agg_trans_affine.h>
#include "Transformer.h"
namespace BPrivate {
namespace Icon {
typedef agg::conv_transform<VertexSource,
agg::trans_affine> Affine;
@@ -54,4 +58,7 @@ class AffineTransformer : public Transformer,
#endif
};
#endif // AFFINE_TRANSFORMER_H
} // namespace Icon
} // namespace BPrivate
#endif // AFFINE_TRANSFORMER_H
@@ -1,14 +1,13 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "ContourTransformer.h"
#include <new>
#include "ContourTransformer.h"
#ifdef ICON_O_MATIC
# include <Message.h>
@@ -19,8 +18,13 @@
# include "PropertyObject.h"
#endif // ICON_O_MATIC
#include <new>
using namespace BPrivate::Icon;
using std::nothrow;
// constructor
ContourTransformer::ContourTransformer(VertexSource& source)
: Transformer(source, "Contour"),
+11 -4
View File
@@ -1,18 +1,22 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef CONTOUR_TRANSFORMER_H
#define CONTOUR_TRANSFORMER_H
#include <agg_conv_contour.h>
#include "Transformer.h"
#include <agg_conv_contour.h>
namespace BPrivate {
namespace Icon {
typedef agg::conv_contour<VertexSource> Contour;
class ContourTransformer : public Transformer,
@@ -51,4 +55,7 @@ class ContourTransformer : public Transformer,
#endif
};
#endif // CONTOUR_TRANSFORMER_H
} // namespace Icon
} // namespace BPrivate
#endif // CONTOUR_TRANSFORMER_H
+10 -3
View File
@@ -1,19 +1,23 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef PATH_SOURCE_H
#define PATH_SOURCE_H
#include "Transformer.h"
#include "agg_path_storage.h"
#include "agg_conv_curve.h"
namespace BPrivate {
namespace Icon {
class PathContainer;
class VectorPath;
@@ -41,4 +45,7 @@ class PathSource : public VertexSource {
AGGCurvedPath fAGGCurvedPath;
};
#endif // PATH_SOURCE_H
} // namespace Icon
} // namespace BPrivate
#endif // PATH_SOURCE_H
@@ -1,21 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "PerspectiveTransformer.h"
#ifdef ICON_O_MATIC
# include <Message.h>
# include <Message.h>
#endif
#include <new>
using namespace BPrivate::Icon;
using std::nothrow;
// constructor
PerspectiveTransformer::PerspectiveTransformer(VertexSource& source)
: Transformer(source, "Perspective"),
@@ -1,18 +1,22 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef PERSPECTIVE_TRANSFORMER_H
#define PERSPECTIVE_TRANSFORMER_H
#include "Transformer.h"
#include <agg_conv_transform.h>
#include <agg_trans_perspective.h>
#include "Transformer.h"
namespace BPrivate {
namespace Icon {
typedef agg::conv_transform<VertexSource,
agg::trans_perspective> Perspective;
@@ -52,4 +56,7 @@ class PerspectiveTransformer : public Transformer,
#endif
};
#endif // PERSPECTIVE_TRANSFORMER_H
} // namespace Icon
} // namespace BPrivate
#endif // PERSPECTIVE_TRANSFORMER_H
@@ -1,14 +1,13 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "StrokeTransformer.h"
#include <new>
#include "StrokeTransformer.h"
#ifdef ICON_O_MATIC
# include <Message.h>
@@ -19,8 +18,12 @@
# include "PropertyObject.h"
#endif // ICON_O_MATIC
#include <new>
using namespace BPrivate::Icon;
using std::nothrow;
// constructor
StrokeTransformer::StrokeTransformer(VertexSource& source)
: Transformer(source, "Stroke"),
+12 -5
View File
@@ -1,19 +1,23 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef STROKE_TRANSFORMER_H
#define STROKE_TRANSFORMER_H
#include <agg_conv_stroke.h>
#include "Transformer.h"
typedef agg::conv_stroke<VertexSource> Stroke;
#include <agg_conv_stroke.h>
namespace BPrivate {
namespace Icon {
typedef agg::conv_stroke<VertexSource> Stroke;
class StrokeTransformer : public Transformer,
public Stroke {
@@ -53,4 +57,7 @@ class StrokeTransformer : public Transformer,
#endif
};
#endif // STROKE_TRANSFORMER_H
} // namespace Icon
} // namespace BPrivate
#endif // STROKE_TRANSFORMER_H
+6 -1
View File
@@ -1,13 +1,18 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#include "Transformer.h"
using namespace BPrivate::Icon;
// constructor
VertexSource::VertexSource()
{
+12 -5
View File
@@ -1,20 +1,24 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORMER_H
#define TRANSFORMER_H
#ifdef ICON_O_MATIC
# include "IconObject.h"
# include "IconObject.h"
#else
# include <SupportDefs.h>
# include <SupportDefs.h>
#endif
namespace BPrivate {
namespace Icon {
class VertexSource {
public:
VertexSource();
@@ -58,4 +62,7 @@ class Transformer : public VertexSource {
VertexSource& fSource;
};
#endif // TRANSFORMER_H
} // namespace Icon
} // namespace BPrivate
#endif // TRANSFORMER_H
@@ -1,5 +1,5 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -8,15 +8,18 @@
#include "TransformerFactory.h"
#ifdef ICON_O_MATIC
# include <Message.h>
#endif
#include "AffineTransformer.h"
#include "ContourTransformer.h"
#include "PerspectiveTransformer.h"
#include "StrokeTransformer.h"
#ifdef ICON_O_MATIC
# include <Message.h>
#endif
using namespace BPrivate::Icon;
// TransformerFor
Transformer*
TransformerFactory::TransformerFor(uint32 type, VertexSource& source)
+11 -3
View File
@@ -1,17 +1,22 @@
/*
* Copyright 2006, Haiku.
* Copyright 2006-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef TRANSFORMER_FACTORY_H
#define TRANSFORMER_FACTORY_H
#include <String.h>
class BMessage;
namespace BPrivate {
namespace Icon {
class Transformer;
class VertexSource;
@@ -32,4 +37,7 @@ class TransformerFactory {
#endif // ICON_O_MATIC
};
#endif // TRANSFORMER_FACTORY_H
} // namespace Icon
} // namespace BPrivate
#endif // TRANSFORMER_FACTORY_H