mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:10:36 +00:00
give theme more control over drawing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2c3f0453ee
commit
a49d3efb05
6 changed files with 132 additions and 41 deletions
|
@ -817,12 +817,38 @@ typedef struct {
|
|||
info = [[info objectForKey: @"GSThemeTiles"] objectForKey: fullName];
|
||||
if ([info isKindOfClass: [NSDictionary class]] == YES)
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
NSString *path;
|
||||
NSString *file;
|
||||
NSString *ext;
|
||||
float x;
|
||||
float y;
|
||||
NSString *name;
|
||||
NSString *path;
|
||||
NSString *file;
|
||||
NSString *ext;
|
||||
GSThemeFillStyle style = GSThemeFillStyleNone;
|
||||
|
||||
name = [info objectForKey: @"FillStyle"];
|
||||
if ([name length] > 0)
|
||||
{
|
||||
if ([name isEqualToString: @"Scale"])
|
||||
{
|
||||
style = GSThemeFillStyleScale;
|
||||
}
|
||||
else if ([name isEqualToString: @"Repeat"])
|
||||
{
|
||||
style = GSThemeFillStyleRepeat;
|
||||
}
|
||||
else if ([name isEqualToString: @"Center"])
|
||||
{
|
||||
style = GSThemeFillStyleCenter;
|
||||
}
|
||||
else if ([name isEqualToString: @"Matrix"])
|
||||
{
|
||||
style = GSThemeFillStyleMatrix;
|
||||
}
|
||||
else if ([name isEqualToString: @"ScaleAll"])
|
||||
{
|
||||
style = GSThemeFillStyleScaleAll;
|
||||
}
|
||||
}
|
||||
x = [[info objectForKey: @"HorizontalDivision"] floatValue];
|
||||
y = [[info objectForKey: @"VerticalDivision"] floatValue];
|
||||
file = [info objectForKey: @"FileName"];
|
||||
|
@ -844,6 +870,7 @@ typedef struct {
|
|||
horizontal: x
|
||||
vertical: y];
|
||||
|
||||
[tiles setFillStyle: style];
|
||||
//TODO(rio) tiles = [[GSDrawTiles alloc] initWithNinePatchImage: image];
|
||||
RELEASE(image);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue