offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -110,6 +110,7 @@ class Decorator {
|
||||
{ return (_colors) ? *_colors : ColorSet(); }
|
||||
|
||||
virtual void GetFootprint(BRegion *region);
|
||||
|
||||
virtual click_type Clicked(BPoint pt, int32 buttons,
|
||||
int32 modifiers);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class BRect;
|
||||
class BRegion;
|
||||
|
||||
class DrawData;
|
||||
class HWInterface;
|
||||
class RGBColor;
|
||||
class ServerBitmap;
|
||||
class ServerCursor;
|
||||
@@ -60,6 +61,8 @@ public:
|
||||
// call this on mode changes!
|
||||
virtual void Update() = 0;
|
||||
|
||||
virtual void SetHWInterface(HWInterface* interface) = 0;
|
||||
|
||||
// clipping for all drawing functions
|
||||
virtual void ConstrainClippingRegion(BRegion* region) = 0;
|
||||
|
||||
@@ -73,14 +76,14 @@ public:
|
||||
int32 rCount,
|
||||
BRegion* clipReg) = 0;
|
||||
|
||||
virtual void InvertRect( const BRect &r) = 0;
|
||||
virtual void InvertRect( BRect r) = 0;
|
||||
|
||||
virtual void DrawBitmap( ServerBitmap *bitmap,
|
||||
const BRect &source,
|
||||
const BRect &dest,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillArc( const BRect &r,
|
||||
virtual void FillArc( BRect r,
|
||||
const float &angle,
|
||||
const float &span,
|
||||
const DrawData *d) = 0;
|
||||
@@ -88,24 +91,24 @@ public:
|
||||
virtual void FillBezier( BPoint *pts,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillEllipse( const BRect &r,
|
||||
virtual void FillEllipse( BRect r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillPolygon( BPoint *ptlist,
|
||||
int32 numpts,
|
||||
const BRect &bounds,
|
||||
BRect bounds,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillRect( const BRect &r,
|
||||
virtual void FillRect( BRect r,
|
||||
const RGBColor &color) = 0;
|
||||
|
||||
virtual void FillRect( const BRect &r,
|
||||
virtual void FillRect( BRect r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillRegion( BRegion &r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillRoundRect( const BRect &r,
|
||||
virtual void FillRoundRect( BRect r,
|
||||
const float &xrad,
|
||||
const float &yrad,
|
||||
const DrawData *d) = 0;
|
||||
@@ -118,10 +121,10 @@ public:
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void FillTriangle( BPoint *pts,
|
||||
const BRect &bounds,
|
||||
BRect bounds,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void StrokeArc( const BRect &r,
|
||||
virtual void StrokeArc( BRect r,
|
||||
const float &angle,
|
||||
const float &span,
|
||||
const DrawData *d) = 0;
|
||||
@@ -129,7 +132,7 @@ public:
|
||||
virtual void StrokeBezier( BPoint *pts,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void StrokeEllipse( const BRect &r,
|
||||
virtual void StrokeEllipse( BRect r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
// this version used by Decorator
|
||||
@@ -154,21 +157,21 @@ public:
|
||||
|
||||
virtual void StrokePolygon( BPoint *ptlist,
|
||||
int32 numpts,
|
||||
const BRect &bounds,
|
||||
BRect bounds,
|
||||
const DrawData *d,
|
||||
bool is_closed=true) = 0;
|
||||
|
||||
// this version used by Decorator
|
||||
virtual void StrokeRect( const BRect &r,
|
||||
virtual void StrokeRect( BRect r,
|
||||
const RGBColor &color) = 0;
|
||||
|
||||
virtual void StrokeRect( const BRect &r,
|
||||
virtual void StrokeRect( BRect r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void StrokeRegion( BRegion &r,
|
||||
const DrawData *d) = 0;
|
||||
|
||||
virtual void StrokeRoundRect(const BRect &r,
|
||||
virtual void StrokeRoundRect(BRect r,
|
||||
const float &xrad,
|
||||
const float &yrad,
|
||||
const DrawData *d) = 0;
|
||||
@@ -187,24 +190,27 @@ public:
|
||||
// Font-related calls
|
||||
|
||||
// DrawData is NOT const because this call updates the pen position in the passed DrawData
|
||||
virtual void DrawString( const char *string,
|
||||
const int32 &length,
|
||||
const BPoint &pt,
|
||||
DrawData *d) = 0;
|
||||
virtual void DrawString( const char* string,
|
||||
int32 length,
|
||||
const BPoint& pt,
|
||||
DrawData* d,
|
||||
escapement_delta *delta = NULL) = 0;
|
||||
|
||||
virtual void DrawString( const char *string,
|
||||
/* virtual void DrawString( const char *string,
|
||||
const int32 &length,
|
||||
const BPoint &pt,
|
||||
const RGBColor &color,
|
||||
escapement_delta *delta=NULL) = 0;
|
||||
escapement_delta *delta = NULL) = 0;*/
|
||||
|
||||
virtual float StringWidth( const char *string,
|
||||
virtual float StringWidth( const char* string,
|
||||
int32 length,
|
||||
const DrawData *d) = 0;
|
||||
const DrawData* d,
|
||||
escapement_delta *delta = NULL) = 0;
|
||||
|
||||
virtual float StringWidth( const char *string,
|
||||
virtual float StringWidth( const char* string,
|
||||
int32 length,
|
||||
const ServerFont &font) = 0;
|
||||
const ServerFont& font,
|
||||
escapement_delta *delta = NULL) = 0;
|
||||
|
||||
virtual float StringHeight( const char *string,
|
||||
int32 length,
|
||||
|
||||
@@ -49,11 +49,11 @@ class DrawData {
|
||||
public:
|
||||
DrawData();
|
||||
DrawData(const DrawData& from);
|
||||
// used for the State stack, no
|
||||
// true 1:1 copy!
|
||||
DrawData(const DrawData* from);
|
||||
virtual ~DrawData();
|
||||
|
||||
// NOTE: this operator will not make a 1:1 copy, it is used
|
||||
// for the state stack and therefor origin and scale are reset
|
||||
// to B_ORIGIN and 1.0.
|
||||
DrawData& operator=(const DrawData& from);
|
||||
|
||||
// coordinate transformation
|
||||
@@ -112,15 +112,10 @@ class DrawData {
|
||||
inline const ServerFont& Font() const
|
||||
{ return fFont; }
|
||||
|
||||
// TODO: remove (is contained in SeverFont::Flags())
|
||||
void SetFontAntiAliasing(bool antiAliasing);
|
||||
inline bool FontAntiAliasing() const
|
||||
{ return fFontAntiAliasing; }
|
||||
|
||||
// TODO: remove (should be part of DisplayDriver::DrawString() as in BView)
|
||||
void SetEscapementDelta(escapement_delta delta);
|
||||
inline escapement_delta EscapementDelta() const
|
||||
{ return fEscapementDelta; }
|
||||
// overrides aliasing flag contained in SeverFont::Flags())
|
||||
void SetForceFontAliasing(bool aliasing);
|
||||
inline bool ForceFontAliasing() const
|
||||
{ return fFontAliasing; }
|
||||
|
||||
// postscript style settings
|
||||
void SetLineCapMode(cap_mode mode);
|
||||
@@ -139,6 +134,9 @@ class DrawData {
|
||||
inline BPoint Transform(const BPoint& point) const;
|
||||
inline BRect Transform(const BRect& rect) const;
|
||||
|
||||
void SetSubPixelPrecise(bool precise);
|
||||
inline bool SubPixelPrecise() const
|
||||
{ return fSubPixelPrecise; }
|
||||
|
||||
protected:
|
||||
BPoint fOrigin;
|
||||
@@ -158,10 +156,19 @@ class DrawData {
|
||||
float fPenSize;
|
||||
|
||||
ServerFont fFont;
|
||||
// TODO: Remove, see above
|
||||
bool fFontAntiAliasing;
|
||||
escapement_delta fEscapementDelta;
|
||||
//
|
||||
// overrides font aliasing flag
|
||||
bool fFontAliasing;
|
||||
|
||||
// This is not part of the normal state stack.
|
||||
// Layer will update it in PushState/PopState.
|
||||
// A BView can have a flag "B_SUBPIXEL_PRECISE",
|
||||
// I never knew what it does on R5, but I can use
|
||||
// it in Painter to actually draw stuff with
|
||||
// sub-pixel coordinates. It means
|
||||
// StrokeLine(BPoint(10, 5), BPoint(20, 9));
|
||||
// will look different from
|
||||
// StrokeLine(BPoint(10.3, 5.8), BPoint(20.6, 9.5));
|
||||
bool fSubPixelPrecise;
|
||||
|
||||
cap_mode fLineCapMode;
|
||||
join_mode fLineJoinMode;
|
||||
@@ -174,7 +181,10 @@ class DrawData {
|
||||
class LayerData : public DrawData {
|
||||
public:
|
||||
LayerData();
|
||||
LayerData(const LayerData &data);
|
||||
LayerData(const LayerData& data);
|
||||
// this version used for the state
|
||||
// stack, sets prevState to data too
|
||||
LayerData(LayerData* data);
|
||||
virtual ~LayerData();
|
||||
|
||||
LayerData& operator=(const LayerData &from);
|
||||
|
||||
@@ -1,341 +0,0 @@
|
||||
/*
|
||||
* Copyright 2005, Stephan Aßmus <[email protected]>. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* API to the Anti-Grain Geometry based "Painter" drawing backend. Manages
|
||||
* rendering pipe-lines for stroke, fills, bitmap and text rendering.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PAINTER_H
|
||||
#define PAINTER_H
|
||||
|
||||
#include <Font.h>
|
||||
#include <Rect.h>
|
||||
#include <FontServer.h>
|
||||
#include <ServerFont.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "forwarding_pixfmt.h"
|
||||
|
||||
#include "RGBColor.h"
|
||||
|
||||
class AGGTextRenderer;
|
||||
class BBitmap;
|
||||
class BRegion;
|
||||
class DrawData;
|
||||
class DrawingModeFactory;
|
||||
class PatternHandler;
|
||||
class RenderingBuffer;
|
||||
class ServerBitmap;
|
||||
class ServerFont;
|
||||
|
||||
// TODO: API transition:
|
||||
// * most all functions should take a DrawData* context parameter instead
|
||||
// of the current pattern argument, that way, each function can
|
||||
// decide for itself, which pieces of information in DrawData it
|
||||
// needs -> well I'm not so sure about this, there could also
|
||||
// be a DrawData member in Painter fGraphicsState or something...
|
||||
// * Painter itself should be made thread safe. Because no
|
||||
// ServerWindow is supposed to draw outside of its clipping region,
|
||||
// there is actually no reason to lock the DisplayDriver. Multiple
|
||||
// threads drawing in the frame buffer at the same time is actually
|
||||
// only bad if their drawing could overlap, but this is already
|
||||
// prevented by the clipping regions (access to those needs to be
|
||||
// locked).
|
||||
// Making Painter thread safe could introduce some overhead, since
|
||||
// some of the current members of Painter would need to be created
|
||||
// on the stack... I'll have to see about that... On multiple CPU
|
||||
// machines though, there would be quite an improvement. In two
|
||||
// years from now, most systems will be at least dual CPU
|
||||
|
||||
class Painter {
|
||||
public:
|
||||
Painter();
|
||||
virtual ~Painter();
|
||||
|
||||
// frame buffer stuff
|
||||
void AttachToBuffer(RenderingBuffer* buffer);
|
||||
void DetachFromBuffer();
|
||||
|
||||
void ConstrainClipping(const BRegion& region);
|
||||
const BRegion* ClippingRegion() const
|
||||
{ return fClippingRegion; }
|
||||
|
||||
void SetDrawData(const DrawData* data);
|
||||
|
||||
// object settings
|
||||
void SetHighColor(const rgb_color& color);
|
||||
inline void SetHighColor(uint8 r, uint8 g, uint8 b, uint8 a = 255);
|
||||
inline void SetHighColor(const RGBColor& color)
|
||||
{ SetHighColor(color.GetColor32()); }
|
||||
void SetLowColor(const rgb_color& color);
|
||||
inline void SetLowColor(uint8 r, uint8 g, uint8 b, uint8 a = 255);
|
||||
inline void SetLowColor(const RGBColor& color)
|
||||
{ SetLowColor(color.GetColor32()); }
|
||||
|
||||
void SetPenSize(float size);
|
||||
void SetDrawingMode(drawing_mode mode);
|
||||
void SetBlendingMode(source_alpha alphaSrcMode,
|
||||
alpha_function alphaFncMode);
|
||||
void SetPattern(const pattern& p);
|
||||
|
||||
void SetPenLocation(const BPoint& location);
|
||||
void SetFont(const ServerFont& font);
|
||||
|
||||
// BView API compatibility (for easier testing)
|
||||
void Sync() {}
|
||||
inline void MovePenTo(const BPoint& location)
|
||||
{ SetPenLocation(location); }
|
||||
|
||||
// painting functions
|
||||
|
||||
// lines
|
||||
BRect StrokeLine( BPoint a,
|
||||
BPoint b,
|
||||
DrawData* context);
|
||||
|
||||
BRect StrokeLine( BPoint b,
|
||||
DrawData* context);
|
||||
|
||||
// return true if the line was either vertical or horizontal
|
||||
// draws a solid one pixel wide line of color c, no blending
|
||||
bool StraightLine( BPoint a,
|
||||
BPoint b,
|
||||
const rgb_color& c) const;
|
||||
|
||||
// triangles
|
||||
BRect StrokeTriangle( BPoint pt1,
|
||||
BPoint pt2,
|
||||
BPoint pt3) const;
|
||||
|
||||
BRect FillTriangle( BPoint pt1,
|
||||
BPoint pt2,
|
||||
BPoint pt3) const;
|
||||
|
||||
// polygons
|
||||
BRect StrokePolygon( const BPoint* ptArray,
|
||||
int32 numPts,
|
||||
bool closed = true) const;
|
||||
|
||||
BRect FillPolygon( const BPoint* ptArray,
|
||||
int32 numPts,
|
||||
bool closed = true) const;
|
||||
|
||||
// bezier curves
|
||||
BRect StrokeBezier( const BPoint* controlPoints) const;
|
||||
|
||||
BRect FillBezier( const BPoint* controlPoints) const;
|
||||
|
||||
// shapes
|
||||
BRect StrokeShape( /*const */BShape* shape) const;
|
||||
|
||||
BRect FillShape( /*const */BShape* shape) const;
|
||||
|
||||
|
||||
// rects
|
||||
BRect StrokeRect( const BRect& r) const;
|
||||
|
||||
// strokes a one pixel wide solid rect, no blending
|
||||
void StrokeRect( const BRect& r,
|
||||
const rgb_color& c) const;
|
||||
|
||||
BRect FillRect( const BRect& r) const;
|
||||
|
||||
// fills a solid rect with color c, no blending
|
||||
void FillRect( const BRect& r,
|
||||
const rgb_color& c) const;
|
||||
|
||||
// round rects
|
||||
BRect StrokeRoundRect(const BRect& r,
|
||||
float xRadius,
|
||||
float yRadius) const;
|
||||
|
||||
BRect FillRoundRect( const BRect& r,
|
||||
float xRadius,
|
||||
float yRadius) const;
|
||||
|
||||
// ellipses
|
||||
BRect StrokeEllipse( BPoint center,
|
||||
float xRadius,
|
||||
float yRadius) const;
|
||||
|
||||
BRect FillEllipse( BPoint center,
|
||||
float xRadius,
|
||||
float yRadius) const;
|
||||
|
||||
// arcs
|
||||
BRect StrokeArc( BPoint center,
|
||||
float xRadius,
|
||||
float yRadius,
|
||||
float angle,
|
||||
float span) const;
|
||||
|
||||
BRect FillArc( BPoint center,
|
||||
float xRadius,
|
||||
float yRadius,
|
||||
float angle,
|
||||
float span) const;
|
||||
|
||||
// strings
|
||||
BRect DrawChar( char aChar);
|
||||
|
||||
BRect DrawChar( char aChar,
|
||||
BPoint baseLine);
|
||||
|
||||
BRect DrawString( const char* utf8String,
|
||||
uint32 length,
|
||||
const escapement_delta* delta = NULL);
|
||||
|
||||
BRect DrawString( const char* utf8String,
|
||||
uint32 length,
|
||||
BPoint baseLine,
|
||||
const escapement_delta* delta = NULL);
|
||||
|
||||
BRect DrawString( const char* utf8String,
|
||||
const escapement_delta* delta = NULL);
|
||||
|
||||
BRect DrawString( const char* utf8String,
|
||||
BPoint baseLine,
|
||||
const escapement_delta* delta = NULL);
|
||||
|
||||
// bitmaps
|
||||
BRect DrawBitmap( const ServerBitmap* bitmap,
|
||||
BRect bitmapRect,
|
||||
BRect viewRect) const;
|
||||
|
||||
// some convenience stuff
|
||||
BRect FillRegion( const BRegion* region) const;
|
||||
|
||||
BRect InvertRect( const BRect& r) const;
|
||||
|
||||
BRect BoundingBox( const char* utf8String,
|
||||
uint32 length,
|
||||
const BPoint& baseLine) const;
|
||||
|
||||
float StringWidth( const char* utf8String,
|
||||
uint32 length) const;
|
||||
|
||||
inline BRect ClipRect(const BRect& rect) const
|
||||
{ return _Clipped(rect); }
|
||||
|
||||
private:
|
||||
void _MakeEmpty();
|
||||
|
||||
void _Transform(BPoint* point,
|
||||
bool centerOffset = true) const;
|
||||
BPoint _Transform(const BPoint& point,
|
||||
bool centerOffset = true) const;
|
||||
BRect _Clipped(const BRect& rect) const;
|
||||
|
||||
void _UpdateFont();
|
||||
void _UpdateLineWidth();
|
||||
void _UpdateDrawingMode();
|
||||
void _SetRendererColor(const rgb_color& color) const;
|
||||
|
||||
// drawing functions stroke/fill
|
||||
BRect _DrawTriangle( BPoint pt1,
|
||||
BPoint pt2,
|
||||
BPoint pt3,
|
||||
bool fill) const;
|
||||
BRect _DrawEllipse( BPoint center,
|
||||
float xRadius,
|
||||
float yRadius,
|
||||
bool fill) const;
|
||||
BRect _DrawShape( /*const */BShape* shape,
|
||||
bool fill) const;
|
||||
BRect _DrawPolygon( const BPoint* ptArray,
|
||||
int32 numPts,
|
||||
bool closed,
|
||||
bool fill) const;
|
||||
|
||||
void _DrawBitmap( const agg::rendering_buffer& srcBuffer,
|
||||
color_space format,
|
||||
BRect actualBitmapRect,
|
||||
BRect bitmapRect,
|
||||
BRect viewRect) const;
|
||||
void _DrawBitmap32( const agg::rendering_buffer& srcBuffer,
|
||||
BRect actualBitmapRect,
|
||||
BRect bitmapRect,
|
||||
BRect viewRect) const;
|
||||
|
||||
void _InvertRect32(BRect r) const;
|
||||
|
||||
|
||||
template<class VertexSource>
|
||||
BRect _BoundingBox(VertexSource& path) const;
|
||||
|
||||
template<class VertexSource>
|
||||
BRect _StrokePath(VertexSource& path) const;
|
||||
template<class VertexSource>
|
||||
BRect _FillPath(VertexSource& path) const;
|
||||
|
||||
agg::rendering_buffer* fBuffer;
|
||||
|
||||
// AGG rendering and rasterization classes
|
||||
pixfmt* fPixelFormat;
|
||||
renderer_base* fBaseRenderer;
|
||||
|
||||
outline_renderer_type* fOutlineRenderer;
|
||||
outline_rasterizer_type* fOutlineRasterizer;
|
||||
|
||||
scanline_type* fScanline;
|
||||
rasterizer_type* fRasterizer;
|
||||
renderer_type* fRenderer;
|
||||
|
||||
font_renderer_solid_type* fFontRendererSolid;
|
||||
font_renderer_bin_type* fFontRendererBin;
|
||||
|
||||
agg::line_profile_aa fLineProfile;
|
||||
|
||||
// for internal coordinate rounding/transformation,
|
||||
// does not concern rendering
|
||||
bool fSubpixelPrecise;
|
||||
|
||||
float fPenSize;
|
||||
BRegion* fClippingRegion;
|
||||
bool fValidClipping;
|
||||
drawing_mode fDrawingMode;
|
||||
source_alpha fAlphaSrcMode;
|
||||
alpha_function fAlphaFncMode;
|
||||
BPoint fPenLocation;
|
||||
|
||||
DrawingModeFactory* fDrawingModeFactory;
|
||||
PatternHandler* fPatternHandler;
|
||||
|
||||
ServerFont fFont;
|
||||
// a class handling rendering and caching of glyphs
|
||||
// it is setup to load from a specific Freetype supported
|
||||
// font file, it uses the FontManager to locate a file
|
||||
// by Family and Style
|
||||
AGGTextRenderer* fTextRenderer;
|
||||
};
|
||||
|
||||
// SetHighColor
|
||||
inline void
|
||||
Painter::SetHighColor(uint8 r, uint8 g, uint8 b, uint8 a)
|
||||
{
|
||||
rgb_color color;
|
||||
color.red = r;
|
||||
color.green = g;
|
||||
color.blue = b;
|
||||
color.alpha = a;
|
||||
SetHighColor(color);
|
||||
}
|
||||
|
||||
// SetLowColor
|
||||
inline void
|
||||
Painter::SetLowColor(uint8 r, uint8 g, uint8 b, uint8 a)
|
||||
{
|
||||
rgb_color color;
|
||||
color.red = r;
|
||||
color.green = g;
|
||||
color.blue = b;
|
||||
color.alpha = a;
|
||||
SetLowColor(color);
|
||||
}
|
||||
|
||||
|
||||
#endif // PAINTER_H
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define RENDERING_BUFFER_H
|
||||
|
||||
#include <GraphicsDefs.h>
|
||||
#include <Rect.h>
|
||||
|
||||
class RenderingBuffer {
|
||||
public:
|
||||
@@ -22,6 +23,11 @@ class RenderingBuffer {
|
||||
|
||||
inline uint32 BitsLength() const
|
||||
{ return Height() * BytesPerRow(); }
|
||||
|
||||
inline BRect Bounds() const
|
||||
{ return BRect(0.0, 0.0,
|
||||
Width() - 1,
|
||||
Height() - 1); }
|
||||
};
|
||||
|
||||
#endif // RENDERING_BUFFER_H
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
# define DEFAULT_BOLD_FONT_FAMILY "Bitstream Vera Sans"
|
||||
# define FALLBACK_BOLD_FONT_FAMILY "Swis721 BT"
|
||||
# define DEFAULT_BOLD_FONT_STYLE "Bold"
|
||||
# define DEFAULT_BOLD_FONT_SIZE 11
|
||||
# define DEFAULT_BOLD_FONT_SIZE 12
|
||||
# define DEFAULT_FIXED_FONT_FAMILY "Bitstream Vera Sans Mono"
|
||||
# define FALLBACK_FIXED_FONT_FAMILY "Courier10 BT"
|
||||
# define DEFAULT_FIXED_FONT_STYLE "Roman"
|
||||
|
||||
Reference in New Issue
Block a user