mirror of
https://review.haiku-os.org/haiku
synced 2025-02-04 04:35:57 +01:00
991547ef6c
* Implemented BGradient, BGradientLinear, BGradientRadial, BGradientDiamond, BGradientConic and BGradientRadialFocus new Interface Kit classes. * Implemented all the (AGG-based) backend necessary in the app_server to render gradients (Painter, DrawingEngine) * app_server/View can convert a BGradient layout to screen coordinates. * Added BGradient methods of the Fill* methods in BView. * Implemented a test app and added it to the image as a demo. * Adopted Icon-O-Matic and libs/icon in order to avoid clashing with the new BGradient class. Re-use some parts where possible. Awesome work, Artur! Thanks a lot. Now a more modern looking GUI has just become much easier to implement! :-) TODO: * Remove the need to have gradient type twice in the app_server protocol. * Refactor some parts of the patch to remove duplicated code (Painter, DrawingEngine). * Adopt the BPicture protocol to know about BGradients. * Review some parts of the BArchivable implementation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
32 lines
644 B
C++
32 lines
644 B
C++
/*
|
|
* Copyright 2006-2008, Haiku.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Artur Wyszynski <harakash@gmail.com>
|
|
*/
|
|
|
|
#ifndef GRADIENT_LINEAR_H
|
|
#define GRADIENT_LINEAR_H
|
|
|
|
#include <Gradient.h>
|
|
|
|
class BPoint;
|
|
|
|
class BGradientLinear : public BGradient {
|
|
public:
|
|
BGradientLinear();
|
|
BGradientLinear(const BPoint& start, const BPoint& end);
|
|
BGradientLinear(float x1, float y1, float x2, float y2);
|
|
|
|
BPoint Start() const;
|
|
void SetStart(const BPoint& start);
|
|
void SetStart(float x1, float y1);
|
|
|
|
BPoint End() const;
|
|
void SetEnd(const BPoint& end);
|
|
void SetEnd(float x2, float y2);
|
|
};
|
|
|
|
#endif // GRADIENT_LINEAR_H
|