Sha256: d4133a0643cf93da6e954fe944d743dc407da48ee2b4eccd3c8a5e7690c8062a

Contents?: true

Size: 1019 Bytes

Versions: 10

Compression:

Stored size: 1019 Bytes

Contents

// -*- c++ -*-
#pragma once
#ifndef __RAYS_SRC_FONT_H__
#define __RAYS_SRC_FONT_H__


#include "rays/defs.h"
#include "rays/font.h"


namespace Rays
{


	class RawFont
	{

		public:

			RawFont ();

			RawFont (const char* name, coord size = 0);

			~RawFont ();

			void draw_string (
				void* context, coord context_height,
				const char* str, coord x, coord y) const;

			String name () const;

			coord size () const;

			coord get_width (const char* str) const;

			coord get_height (
				coord* ascent  = NULL,
				coord* descent = NULL,
				coord* leading = NULL) const;

			operator bool () const;

			bool operator ! () const;

			struct Data;

			Xot::PSharedImpl<Data> self;

	};// RawFont


	const RawFont& Font_get_raw (const Font& font, float pixel_density);

	coord Font_get_width (const Font& font, float pixel_density, const char* str);

	coord Font_get_height (
		const Font& font, float pixel_density,
		coord* ascent = NULL, coord* descent = NULL, coord* leading = NULL);


}// Rays


#endif//EOH

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rays-0.1.47 src/font.h
rays-0.1.46 src/font.h
rays-0.1.45 src/font.h
rays-0.1.44 src/font.h
rays-0.1.43 src/font.h
rays-0.1.42 src/font.h
rays-0.1.40 src/font.h
rays-0.1.39 src/font.h
rays-0.1.38 src/font.h
rays-0.1.37 src/font.h