// TransformScaleY scales the height of the following text, drawings and
// images. scaleHt is the percentage scaling factor. (x, y) is center of
// scaling.
//
// The TransformBegin() example demonstrates this method.
491199
func (f *Fpdf) TransformScaleY(scaleHt, x, y float64) {
	f.TransformScale(100, scaleHt, x, y)
}
1158324
func IncrScaleInv(a []float32, s float32, incr []float32) {
	IncrScale(a, 1/s, incr)
}
1038041
func (c RGBA) Scaled(scale float64) RGBA {
	return RGBA{
		R: c.R * scale,
		G: c.G * scale,
		B: c.B * scale,
		A: c.A * scale,
	}
}
634551
func (a *ReplaySnapshotArgs) SetScale(scale float64) *ReplaySnapshotArgs {
	a.Scale = &scale
	return a
}
977646
func (z *Big) SetScale(scale int) *Big {
	z.exp = -scale
	return z
}
1060920
func IncrScale(a []float32, s float32, incr []float32) {
	incr = incr[:len(a)]
	for i, v := range a {
		incr[i] += v * s
	}
}
769936
func IncrScale(a []float64, s float64, incr []float64) {
	incr = incr[:len(a)]
	for i, v := range a {
		incr[i] += v * s
	}
}
1112073
func (matrix *Matrix) InitScale(sx, sy float64) {
	C.cairo_matrix_init_scale((*C.cairo_matrix_t)(unsafe.Pointer(matrix)), C.double(sx), C.double(sy))
}
756555
func Scale(img image.Image, width, height int) draw.Image {
	dimg := image.NewRGBA(image.Rect(0, 0, width, height))
	graphics.Scale(dimg, img)

	return dimg
}
1152670
func NewScaleConverter() *ScaleConverter {
	scheme := runtime.NewScheme()
	utilruntime.Must(scaleautoscaling.AddToScheme(scheme))
	utilruntime.Must(scalescheme.AddToScheme(scheme))
	utilruntime.Must(scaleext.AddToScheme(scheme))
	utilruntime.Must(scaleextint.AddToScheme(scheme))
	utilruntime.Must(scaleappsint.AddToScheme(scheme))
	utilruntime.Must(scaleappsv1beta1.AddToScheme(scheme))
	utilruntime.Must(scaleappsv1beta2.AddToScheme(scheme))

	return &ScaleConverter{
		scheme: scheme,
		codecs: serializer.NewCodecFactory(scheme),
		internalVersioner: runtime.NewMultiGroupVersioner(
			scalescheme.SchemeGroupVersion,
			schema.GroupKind{Group: scaleext.GroupName, Kind: "Scale"},
			schema.GroupKind{Group: scaleautoscaling.GroupName, Kind: "Scale"},
			schema.GroupKind{Group: scaleappsv1beta1.GroupName, Kind: "Scale"},
			schema.GroupKind{Group: scaleappsv1beta2.GroupName, Kind: "Scale"},
		),
	}
}
973624
func (a infDecAmount) AsScale(scale Scale) (infDecAmount, bool) {
	tmp := &inf.Dec{}
	tmp.Round(a.Dec, scale.infScale(), inf.RoundUp)
	return infDecAmount{tmp}, tmp.Cmp(a.Dec) == 0
}
122298
func (vec *T) Scale(f float64) *T {
	vec[0] *= f
	vec[1] *= f
	return vec
}
603969
func (t *Transformer) Transform(e *pdk.Entity) error {
	latitude, err := e.F64(t.LatPath...)
	if err != nil {
		return errors.Wrap(err, "getting latidude")
	}
	longitude, err := e.F64(t.LonPath...)
	if err != nil {
		return errors.Wrap(err, "getting longitude")
	}
	hsh := geoHash(float64(latitude), float64(longitude), t.Precision)
	err = e.SetString(hsh, t.ResultPath...)
	return errors.Wrap(err, "setting result")
}
331770
func (mat *T) Scaling() vec3.T {
	return vec3.T{mat[0][0], mat[1][1], mat[2][2]}
}
1098721
func NewScaleButton(size IconSize, min, max, step float64, icons []string) *ScaleButton {
	cicons := stringArray2Native(icons)
	defer C.g_strfreev(cicons)
	return &ScaleButton{Bin{Container{Widget{
		C.gtk_scale_button_new(C.GtkIconSize(size), gdouble(min), gdouble(max), gdouble(step), cicons)}}}}
}
917112
func (a *AddLabels) Transform(mfs []*dto.MetricFamily) []*dto.MetricFamily {
	for i := range mfs {
		for j, m := range mfs[i].Metric {
			// Filter out labels to add
			labels := m.Label[:0]
			for _, l := range m.Label {
				if _, ok := a.Labels[l.GetName()]; !ok {
					labels = append(labels, l)
				}
			}

			// Add all new labels to the metric
			for k, v := range a.Labels {
				labels = append(labels, L(k, v))
			}
			sort.Sort(labelPairSorter(labels))
			mfs[i].Metric[j].Label = labels
		}
	}
	return mfs
}
763864
func (t *Text) AddScale(s float32) bool {
	if s < 0 && t.Scale <= t.ScaleMin {
		return false
	}
	if s > 0 && t.Scale >= t.ScaleMax {
		return false
	}
	t.Scale += s
	t.scaleMatrix = mgl32.Scale3D(t.Scale, t.Scale, t.Scale)
	return true
}