Documentation ¶
Index ¶
- Constants
- func AppPictureAspectRatio(app RenderApplication) float64
- func Dbg(things ...interface{})
- func PictureAspectRatio(width uint, height uint) float64
- type BaseConfig
- type BaseNumerics
- type EscapeValue
- type MockRenderApplication
- type OpaqueProxyFlyweight
- type PixelMember
- type RenderApplication
Constants ¶
const AllocLarge uint = AllocMedium * 1024
A large number
const AllocMedium uint = AllocSmall * 64
A medium sized number
const AllocSmall uint = 1024
A small number
const AllocTiny uint = 128
A tiny allocation
Variables ¶
This section is empty.
Functions ¶
func AppPictureAspectRatio ¶
func AppPictureAspectRatio(app RenderApplication) float64
func PictureAspectRatio ¶
Types ¶
type BaseConfig ¶
type BaseNumerics ¶
type BaseNumerics struct { WholeWidth uint WholeHeight uint PicXMin int PicXMax int // exclusive maximum PicYMin int PicYMax int // exclusive maximum }
Numerics that are aware of a picture and of the Mandelbrot iteration limit
func Make ¶
func Make(app RenderApplication) BaseNumerics
func (*BaseNumerics) PictureMax ¶
func (base *BaseNumerics) PictureMax() (int, int)
func (*BaseNumerics) PictureMin ¶
func (base *BaseNumerics) PictureMin() (int, int)
func (*BaseNumerics) PictureSubImage ¶
func (base *BaseNumerics) PictureSubImage(rect image.Rectangle)
Change the drawing context to a sub-part of the image
func (*BaseNumerics) RestorePicBounds ¶
func (base *BaseNumerics) RestorePicBounds()
type EscapeValue ¶
type MockRenderApplication ¶
type MockRenderApplication struct { TBaseConfig bool TPictureDimensions bool Base BaseConfig PictureWidth uint PictureHeight uint }
func (*MockRenderApplication) BaseConfig ¶
func (mock *MockRenderApplication) BaseConfig() BaseConfig
func (*MockRenderApplication) PictureDimensions ¶
func (mock *MockRenderApplication) PictureDimensions() (uint, uint)
type OpaqueProxyFlyweight ¶
type OpaqueProxyFlyweight interface { ClaimExtrinsics() Extrinsically(func()) }
OpaqueProxyFlyweight enables implementation of its eponymous design pattern. You need lots of objects, but creating them is expensive. You want to externalize state, but your object is opaque (you access it through an interface) Only these objects can know the type of the external state. So create an extension of this object that acts like a proxy When needed, it will grab the extrinsic, without exposing the details to the client.
type PixelMember ¶
type PixelMember struct { I int J int Member EscapeValue }
PixelMember is a EscapeValue associated with a pixel
type RenderApplication ¶
type RenderApplication interface { // Basic configuration BaseConfig() BaseConfig PictureDimensions() (uint, uint) }
A facade used by subsystems to interact with the application at large