|
@@ -13,7 +13,8 @@ Rahmen::Rahmen()
|
|
|
: Zeichnung(),
|
|
|
br( 1 ),
|
|
|
farbe( 0xFF000000 ),
|
|
|
- alpha( 0 )
|
|
|
+ alpha( 0 ),
|
|
|
+ breaks( 0 )
|
|
|
{}
|
|
|
|
|
|
|
|
@@ -27,6 +28,13 @@ void Rahmen::setRamenBreite( int br )
|
|
|
rend = 1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+void Rahmen::setBreaks( bool br )
|
|
|
+{
|
|
|
+ breaks = br;
|
|
|
+}
|
|
|
+
|
|
|
void Rahmen::setAlpha( bool a )
|
|
|
{
|
|
|
alpha = a;
|
|
@@ -54,6 +62,12 @@ int Rahmen::getRBreite() const
|
|
|
return br;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+bool Rahmen::hasBreaks() const
|
|
|
+{
|
|
|
+ return breaks;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -72,24 +86,62 @@ void LRahmen::render( Bild &Obj )
|
|
|
int y = pos.y;
|
|
|
int b = x + gr.x - 1;
|
|
|
int h = y + gr.y - 1;
|
|
|
- if( alpha )
|
|
|
+ if( !breaks )
|
|
|
{
|
|
|
- for( int i = 0; i < br; ++i )
|
|
|
+ if( alpha )
|
|
|
+ {
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieVAlpha( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, h - i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieVAlpha( x + i, y + i, gr.y - i * 2, farbe );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- Obj.drawLinieHAlpha( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieVAlpha( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
- Obj.drawLinieHAlpha( x + i + 1, h - i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieVAlpha( x + i, y + i, gr.y - i * 2, farbe );
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ Obj.drawLinieH( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieV( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
+ Obj.drawLinieH( x + i + 1, h - i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieV( x + i, y + i, gr.y - i * 2, farbe );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for( int i = 0; i < br; ++i )
|
|
|
+ if( alpha )
|
|
|
+ {
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ for( int x = pos.x; x < gr.x; x += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, y + i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, h - i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ }
|
|
|
+ for( int y = pos.y; y < gr.y; y += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieVAlpha( b - i, y + i + 1, min( 10, gr.y - i * 2 - 2 ), farbe );
|
|
|
+ Obj.drawLinieVAlpha( x + i, y + i, min( 10, gr.y - i * 2 ), farbe );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- Obj.drawLinieH( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieV( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
- Obj.drawLinieH( x + i + 1, h - i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieV( x + i, y + i, gr.y - i * 2, farbe );
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ for( int x = pos.x; x < gr.x; x += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieH( x + i + 1, y + i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ Obj.drawLinieH( x + i + 1, h - i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ }
|
|
|
+ for( int y = pos.y; y < gr.y; y += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieV( b - i, y + i + 1, min( 10, gr.y - i * 2 - 2 ), farbe );
|
|
|
+ Obj.drawLinieV( x + i, y + i, min( 10, gr.y - i * 2 ), farbe );
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -134,24 +186,62 @@ void Rahmen3D::render( Bild &Obj )
|
|
|
int b = x + gr.x - 1;
|
|
|
int h = y + gr.y - 1;
|
|
|
int fcomp = ( farbe & 0xFF000000 ) | ( ~farbe & 0x00FFFFFF );
|
|
|
- if( alpha )
|
|
|
+ if( !breaks )
|
|
|
{
|
|
|
- for( int i = 0; i < br; ++i )
|
|
|
+ if( alpha )
|
|
|
{
|
|
|
- Obj.drawLinieHAlpha( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieVAlpha( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
- Obj.drawLinieHAlpha( x + i + 1, h - i, gr.x - i * 2 - 1, fcomp );
|
|
|
- Obj.drawLinieVAlpha( x + i, y + i, gr.y - i * 2, fcomp );
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieVAlpha( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, h - i, gr.x - i * 2 - 1, fcomp );
|
|
|
+ Obj.drawLinieVAlpha( x + i, y + i, gr.y - i * 2, fcomp );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ Obj.drawLinieH( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
+ Obj.drawLinieV( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
+ Obj.drawLinieH( x + i + 1, h - i, gr.x - i * 2 - 1, fcomp );
|
|
|
+ Obj.drawLinieV( x + i, y + i, gr.y - i * 2, fcomp );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for( int i = 0; i < br; ++i )
|
|
|
+ if( alpha )
|
|
|
+ {
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ for( int x = pos.x; x < gr.x; x += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, y + i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ Obj.drawLinieHAlpha( x + i + 1, h - i, min( 10, gr.x - i * 2 - 1 ), fcomp );
|
|
|
+ }
|
|
|
+ for( int y = pos.y; y < gr.y; y += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieVAlpha( b - i, y + i + 1, min( 10, gr.y - i * 2 - 2 ), farbe );
|
|
|
+ Obj.drawLinieVAlpha( x + i, y + i, min( 10, gr.y - i * 2 ), fcomp );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- Obj.drawLinieH( x + i + 1, y + i, gr.x - i * 2 - 1, farbe );
|
|
|
- Obj.drawLinieV( b - i, y + i + 1, gr.y - i * 2 - 2, farbe );
|
|
|
- Obj.drawLinieH( x + i + 1, h - i, gr.x - i * 2 - 1, fcomp );
|
|
|
- Obj.drawLinieV( x + i, y + i, gr.y - i * 2, fcomp );
|
|
|
+ for( int i = 0; i < br; ++i )
|
|
|
+ {
|
|
|
+ for( int x = pos.x; x < gr.x; x += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieH( x + i + 1, y + i, min( 10, gr.x - i * 2 - 1 ), farbe );
|
|
|
+ Obj.drawLinieH( x + i + 1, h - i, min( 10, gr.x - i * 2 - 1 ), fcomp );
|
|
|
+ }
|
|
|
+ for( int y = pos.y; y < gr.y; y += 20 )
|
|
|
+ {
|
|
|
+ Obj.drawLinieV( b - i, y + i + 1, min( 10, gr.y - i * 2 - 2 ), farbe );
|
|
|
+ Obj.drawLinieV( x + i, y + i, min( 10, gr.y - i * 2 ), fcomp );
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|