Swift part2
■ このスレッドは過去ログ倉庫に格納されています
0379デフォルトの名無しさん
2014/07/05(土) 02:35:25.49ID:dvkFKgZctype TinyOperation interface {
MoveTo( target Point )
LineTo( target Point )
}
type Operation interface {
TinyOperation
QuadraticBezierTo( target, control1 Point )
CubicBezierTo( target, control1 control2 Point )
}
type OperationAdapterForTiny struct {
TinyOperation
/* その他略 */
}
func ( _ *OperationAdapterForTiny )QuadraticBezierTo( target, control1 Point ){ /*略*/ }
func ( _ *OperationAdapterForTiny )
CubicBezierTo( target, control1 control2 Point ) { /*略*/ }
type TinySVG{ /*略*/ }
func ( _*TinySVG )MoveTo( target Point ) { /*略*/ }
func ( _*TinySVG )LineTo( target Point ) { /*略*/ }
func Main() {
path := &OperationAdapterForTiny{ /*略*/ }
path.TinyOperation = &TinySVG{}
path.CubicBezierTo( &Point{ 1, 0 }, &Point{ 1, 2 }, &Point{ 2, 2 } )
}
■ このスレッドは過去ログ倉庫に格納されています