![]() ![]() I like the line because it goes on forever.” Stacey Toth sided with the line: “I hate shapes because they are confined, just like our existence. Also, there’s a connection with pyramids and aliens.” Jarrod Bryan sided with the triangle: “I like the multi-symbolism behind the triangle and it’s a great graphic element. They have crisp corners, work at a variety of sizes and can be used to measure things.” Grace Domecus sided with the square: “I like organization and grids, squares fit naturally into both. A circle can roll or float away, become bigger or smaller. Sylvie Lee sided with the circle: “Squares and triangles feel more rigid and restricting. Conveniently enough, no shape was left behind as each of the 4 designers interviewed quickly adopted their favorite and defended its value. ![]() I asked fellow designers what their favorite shapes were and why. And as they say on the Internet, the results surprised me.īefore creating the book, which I cleverly named 4 Shapes: A Circle, a Square, and a Triangle Walk Into a Bar, it was time to revisit the basics. Giving a strong nod to Modernism’s giants: László Moholy-Nagy, Josef Albers, and Piet Mondrian, I started to play. You can create circles, squares, triangles, and lines all within BookWright! To showcase just how powerful the tool is, I decided to put it to the test by creating a book exclusively made out of shapes. It means that your images can assume alternative geometric forms, and you can add geometric graphic elements to your pages-perfect for folks like me who love shapes and want to give their books extra flair. One of the coolest features of BookWright is the Shapes Tool. Now, as an adult, I’m still amazed at the wonders of geometry, and how it magically makes designs better. I was specifically surprised how basic geometric combinations were capable of forming structures infinitely big and infinitely small. I just couldn’t believe that everything, even sound was made out of shapes. My first introduction to shapes as a larger-than-life concept was probably as a 7-year-old while watching Disney’s 1979’s film Donald Duck in Mathmagic Land. What you need to do is to "mask" the corners of the image by clipping it with a CGPath.As a designer, I’m madly in love with shapes. You aren't actually doing anything other than scaling there. The solution I found was to use CGContextClipToMask instead: CGContextRef mainViewContentContext ĬGContextClipToMask(mainViewContentContext, CGRectMake(0, 0, targetSize.width, targetSize.height), maskImage) The problem was the use of CGImageCreateWithMask which returned an all black image. image is retained by the property setting above, so we can convert the finished resized image to a UIImage Create CGImageRef of the main view bitmap content, and thenĬGImageRef mainViewContentBitmapContext = CGBitmapContextCreateImage(mainViewContentContext) ĬGContextRelease(mainViewContentContext) ĬGImageRef maskImage = ĬGImageRef resizedImage = CGImageCreateWithMask(mainViewContentBitmapContext, maskImage) ĬGImageRelease(mainViewContentBitmapContext) CGContextFillRect(mainViewContentContext, CGRectMake(0, 0, targetSize.width, targetSize.height)) ĬGContextDrawImage(mainViewContentContext, CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledWidth, scaledHeight), self.CGImage) CGContextSetFillColorWithColor(mainViewContentContext, CGColor]) MainViewContentContext = CGBitmapContextCreate (NULL, targetSize.width, targetSize.height, 8, 0, colorSpace, kCGImageAlphaPremultipliedLast) create a bitmap graphics context the size of the image ThumbnailPoint.x = (targetSize.width - scaledWidth) * 0.5 ĬolorSpace = CGColorSpaceCreateDeviceRGB() Otherwise, we'll use theįloat widthFactor = targetSize.width / width įloat heightFactor = targetSize.height / height ![]() the scale factor by dividing it by the image is wider than tall, we'll figure out If ( CGSizeEqualToSize(imageSize, targetSize) = NO ) since not all images are square, we want to scale account the ideal of maintaining proportionsĬGPoint thumbnailPoint = CGPointMake(0,0) the image actually is drawn at, once we take into IMPORTANT: the "targetHeight" is the size of the space scaledWidth and scaledHeight will be the original, an image by half, scaleFactor will be 0.5. scaleFactor will be the fraction that we'll (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize My problem is that resizedImage is always nil and I don't find the error. For this I used code from TheElements iPhone Example and some image resize code I found. I try to get rounded corners on a UIImage, what I read so far, the easiest way is to use a mask images. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |