fractional rating doesn't work for small images (11x11) #9

Closed
nurey opened this Issue Mar 5, 2012 · 6 comments

Comments

Projects
None yet
3 participants
@nurey

nurey commented Mar 5, 2012

There seems to be a problem when using small images. 11x11 px in my case. Not sure why.
Here's how it looks like rendered with DLStarRatingControl -- http://a.yfrog.com/img812/9646/l37.png

Here's the 11x11 star -- http://a.yfrog.com/img576/7623/qr8d.png

@dlinsin

This comment has been minimized.

Show comment
Hide comment
@dlinsin

dlinsin Mar 5, 2012

Owner

Thanks, I'll look into it as soon as I get around

Owner

dlinsin commented Mar 5, 2012

Thanks, I'll look into it as soon as I get around

@dlinsin

This comment has been minimized.

Show comment
Hide comment
@dlinsin

dlinsin Mar 11, 2012

Owner

I could reproduce this if isFractional is set to YES if you set it to NO you should be okay:

[[DLStarRatingControl alloc] initWithFrame:CGRectMake(0, 154, 320, 153) andStars:5 isFractional:NO];

I'll investigate further, but the code was provided by @kuchmiyalex and I need to dig into it first.

Owner

dlinsin commented Mar 11, 2012

I could reproduce this if isFractional is set to YES if you set it to NO you should be okay:

[[DLStarRatingControl alloc] initWithFrame:CGRectMake(0, 154, 320, 153) andStars:5 isFractional:NO];

I'll investigate further, but the code was provided by @kuchmiyalex and I need to dig into it first.

@dlinsin

This comment has been minimized.

Show comment
Hide comment
@dlinsin

dlinsin Mar 11, 2012

Owner

@kuchmiyalex I could use your support on this. The method - (UIImage *)croppedImage:(UIImage*)image in DLStarView.m doesn't work with smaller images. I don't really understand why.

Owner

dlinsin commented Mar 11, 2012

@kuchmiyalex I could use your support on this. The method - (UIImage *)croppedImage:(UIImage*)image in DLStarView.m doesn't work with smaller images. I don't really understand why.

@kuchmiyalex

This comment has been minimized.

Show comment
Hide comment
@kuchmiyalex

kuchmiyalex Mar 11, 2012

Contributor

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.

Contributor

kuchmiyalex commented Mar 11, 2012

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.

@dlinsin

This comment has been minimized.

Show comment
Hide comment
@dlinsin

dlinsin Mar 11, 2012

Owner

Thanks for the feedback, I'll add it to the docs.

with kind regards,

David Linsin


// web: http://dlinsin.github.com

On 11.03.2012, at 13:44, kuchmiyalexreply@reply.github.com wrote:

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.


Reply to this email directly or view it on GitHub:
#9 (comment)

Owner

dlinsin commented Mar 11, 2012

Thanks for the feedback, I'll add it to the docs.

with kind regards,

David Linsin


// web: http://dlinsin.github.com

On 11.03.2012, at 13:44, kuchmiyalexreply@reply.github.com wrote:

You should use image with width fractional by 10, so it could be 10x10/20x20/30x30px image.


Reply to this email directly or view it on GitHub:
#9 (comment)

@nurey

This comment has been minimized.

Show comment
Hide comment
@nurey

nurey Mar 11, 2012

Great. Thanks Alex. I goess it would also work well with images in increments of 5 if you set kNumberOfFractions to 5.

nurey commented Mar 11, 2012

Great. Thanks Alex. I goess it would also work well with images in increments of 5 if you set kNumberOfFractions to 5.

@dlinsin dlinsin closed this in cb64146 Mar 18, 2012

dlinsin added a commit that referenced this issue Jul 14, 2012

Merge branch 'master' into 4_ARC
* master:
  updated podspec
  Basic spec file, the version and tag/commit for the build will need to be updated.
  no not retain delegate
  Added description for fractional images #9
  adopted description
  dropping ios3 support
  minor cleanup of #7
  Unused method removed
  Fractional rating support
  added zucchini reference
  Added UI testing with zucchini
  Added accessibility labels for individual stars
  moved link to main repo
  Revert "moved sample screenshot to Downloads area"
  moved sample screenshot to Downloads area
  added ability to set custom images for single stars and updated the demo project with this setting
  added ability to set custom images for single stars and updated the demo project with this setting
  updated for xcode 4

Conflicts:
	DLStarRating/DLStarRatingControl.h
	DLStarRating/DLStarRatingControl.m
	DLStarRatingDemo/Classes/DLStarRatingDemoViewController.m
	DLStarRatingDemo/DLStarRatingDemo.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment