Wszystkie wpisy, których autorem jest admin

One Illustration, Three SVG outputs

Post pobrano z: One Illustration, Three SVG outputs

Let’s say we draw the same vector graphic in different design applications and export each one as SVG for use on the web. Should we expect the same SVG file from each application?

On the one hand, we might expect each file to be the same because of our past history with exporting images. Applications have typically been consistent at saving JPGs, PNGs, and GIFs with perhaps minor differences to the overall file size.

On the other hand, SVG is different than our typical image file and our expectations might need to adapt to those differences. The output of SVG might be visual, but what we’re really talking about is math and code. That means an SVG file is a little more comparable to a CSS file that has been compiled from a preprocessor. Your results may vary based on the method used to compile the code.

I decided to draw the same illustration in Illustrator, Sketch, and Figma and compare exported SVG code. This post will summarize those results.

About the Illustration

It’s nothing fancy. A basic plus sign with a white fill on top of a circle with a black fill. The idea was to use something that’s close to an icon that would be common on any site.

The illustration was drawn three times, once in each application. Making the icon in one application then copying and pasting it in another didn’t seem like a fair comparison. This allowed each application to interpret the SVG from its own native tools. I’m not the most skilled illustrator, so I made the illustration once, then traced it in the other applications to ensure everything was to scale and that all the points were nearly identical.

About the Comparison

It’s worth noting that this post is not at all concerned about the „best” export of the group. What’s more interesting is (1) whether there are differences in how SVG code is compiled and (2) how those possible difference might affect a front-end workflow or even influence which application is better suited for a particular project.

Here’s what is being compared:

  • File Size
  • Code Structure
  • Naming Standards

One more thing with mentioning is that we’re assuming default export options in this comparison. Illustrator has a robust set of options that can completely change how an SVG file is saved, where the others do not. I decided to use the default Illustrator export settings, with the minor exception of not minifying the code on export.

All good? Let’s look at the results.

Side by Side Code Comparison

See the Pen One Illustration, Three SVG Outputs by Geoff Graham (@geoffgraham) on CodePen.

Table Comparison

Comparison Illustrator Sketch Figma
Export Settings Yes No No
File Size 701 Bytes 946 Bytes 1 KB
XML Header No Yes No
Includes <height> and <width> attributes No Yes Yes
Includes viewBox Attribute Yes Yes Yes
SVG ID Yes No No
SVG ID Name Generated NA NA
SVG Data Name Attribute Layer Name NA NA
Title Tag (<title>) File Name Artboard Name Layer Name
Description Tag (<description>) NA Created with Sketch Created with Figma
Includes Definitions (<defs>) No Yes Yes
Includes Groups (<g>) Yes Yes Yes
Group ID Name NA Organized by Page Name, Artboard, Group, then Layer Organized by Frame, Group, then Layer
Includes Use (<use>) No No Yes

Comparison Summary

Those are some pretty interesting results. Like I mentioned earlier, the goal here is not to declare a winner of who does things best but to gauge whether there are differences — and there certainly are differences!

File Size

One huge benefit of SVG, in general, is its small file size versus raster images. That benefit shines in all three cases. For example, the same icon exported as a PNG in Sketch came out to 12KB. Sketch’s SVG output is 97% savings from its PNG counterpart.

I’m not particularly sure that the differences in file sizes between the three results here are all that crucial, despite the fact that Illustrator’s output results in a file size that is ~30% smaller than Figma’s output. I only say that because it’s likely that the SVG file that gets used in production gets minified and cached in the same fashion that makes it all very negligible.

That said, the fact that there is a file size difference at all might influence which build tools you use for your SVG workflow and how the settings for that build tool are configured.

Code Structure

The difference in file size really comes down to how each application structures the code it compiles. For example, where Figma is super into grouping and defining shapes and paths for the sake of making them more reusable in different contexts, Illustrator avoids them altogether and tends to make the file easier to drop inline.

Again, the goal is not to determine whether one approach is better than the other, but recognize that there are different philosophies going into the generated file and let that help determine the right tool for the current job. You might get a smaller file size in one instance, but perhaps more flexibility in another, depending on your needs and priorities.

Naming Standards

Another case in point is how Illustrator uses unique generated IDs on the <svg> element by default. That makes dropping the file inline much less likely to conflict with other inline files where a designer may have used the same file, artboard or layer names across multiple files. By contrast, neither Sketch nor Figma uses an ID directly on the SVG element.

There are build tools that will help craft ID and class names but, if you are tasked with editing an SVG file manually or have to use a file as it’s provided to you for some reason, then knowing how an application names things might influence how you approach your work.

Wrapping Up

The biggest takeaway for me from this comparison is a reminder that SVG is code at the end of the day. The applications we use to illustration vector graphics are simply a GUI for creating code and the way that code gets written is likely to be different based on who is writing it.

It’s really no different than something like the CodePen Rodeo (when is the next one, by the way?) where a single design is provided and many people go off to code it in their own ways. There is no „right” way to code it, but it’s fun to see how different people take different paths to achieve the same deliverable.

The bottom line underscored by this comparison is that we can’t take the assets we have for granted. As much as we may enjoy the fact that machines are willing to make decisions on our behalf, a front-end workflow is still overwhelmingly a subjective task and influences how we do our jobs.


One Illustration, Three SVG outputs is a post from CSS-Tricks

How to Create a Post Box Illustration in Adobe Illustrator

Post pobrano z: How to Create a Post Box Illustration in Adobe Illustrator

Final product image
What You’ll Be Creating

The humble post box has been our connection to people around the world for decades. They come in all different shapes and sizes, but the pillar shape is arguably the most iconic. In this tutorial, you will learn the step-by-step process of how to create the classic pillar-shaped red post box. 

Some of the skills you will learn will include creating basic 2D shapes, manipulating anchor points, and using the Pathfinder tool. I hope you enjoy the process and learn something new along the way. Let’s begin!

Get inspired with more Mail Vector Graphics from GraphicRiver.

1. How to Create the Post Box Shape

Step 1

Open up your Adobe Illustrator and create a New Document (File > New). For this tutorial we’ll create a custom document at 700 x 1000 px, but you can choose different dimensions for your own project.

Create a custom document at 700 x 1000 px

Step 2

Now that we have the new document open, we can begin to create the body of the post box. Start by selecting the Rectangle Tool (M). Choose a nice red color to fill your rectangle with.

Red colour to fill your rectangle with using the colour picker

Step 3

Using the Rectangle Tool (M), draw a rectangular shape. We will use this rectangle as the main body for our post box.

Create a red rectangle using the Rectangle Tool M

Step 4

Using the Color Picker Tool again, select a new color for the base of your post box.

Grey colour to fill your rectangle with using the colour picker

Step 5

Use the Rectangle Tool (M) again to create the base of our post box. Make a box shape slightly wider than the width of the red rectangle, and place it at the bottom.

The base of the post box

2. How to Create the Post Box Head

Step 1

Using the same red color as before, select the Pen Tool (P) and start to create the wave shape on the right, which will make up part of the top of your post box. You can use the Direct Selection Tool (A) to manipulate your anchor points and handles to create the shape you want.

Using the pen tool to create a shape

Step 2

Use the Selection Tool (V) and make sure that your new shape has been selected. Duplicate the shape and Paste it in place by using the shortcut keys Control-C (Copy) and then Control-Shift-V (Paste in Place). This will place your new shape directly on top of the previous one.

Move the new shape over to the left (you can hold the Shift key on your keyboard while you move the shape to ensure that it moves in a straight line).

Duplicating your new shape

Step 3

Right-click on the duplicate shape, and choose Transform and then Reflect. Then make sure you have Vertical selected and click OK. This will flip the shape.

Right click choose Transform and then Reflect

Step 4

Using the Selection Tool (V), move the flipped shape so that it lines up correctly with your previous shape. With both shapes selected, press Control-G to Group the shapes together. This will make moving your shapes around easier.

The final red shape

Step 5

Choose a brighter red color and use the Rectangle Tool (M) to create a thin rectangle. Place it on top of your new shape.

Add a bright red rectangle on top of your shape

Step 6

Choose the previous red color again and use the Ellipse Tool (L) to create a long red circular shape.

A red circular shape

Step 7

Using the Rectangle Tool (M), draw a rectangle on top of the circular shape and place it just after the horizontal mid-section.

Bright rectangle on top of circular shape

Step 8

Use the Selection Tool (V) and, making sure both shapes are selected, use the Pathfinder panel and select Minus Front. This will remove the top shape and anything else that it was overlapping (in this case, the bottom of the circular shape).

Minus Front on both of the shapes

Step 9

Now use a combination of the Rectangle Tool (M) and the Ellipse Tool (L) to create a thin rectangle to place on the bottom and a small circle to place on top.

To make an even circle, draw an oval using the Ellipse Tool (L) while holding down the Shift key. 

Add a circle and rectangle to the shape

Step 10

Now combine all the shapes together to create the base shape for the top of the post box. Place this new shape on top of the body.

Place the top of post box on the body

3. How to Create the Post Box Letter Hole

Step 1

For the letter hole, we will create the right side first and then mirror it to create the left side. This will make sure that our final shapes are symmetrical. Let’s start by creating choosing a new dark grey color for the hole using the Color Picker.

Choose a dark blue colour

Step 2

Use the Rectangle Tool (M) to create the small rectangle. This will be the left side of our letter hole.

Dark rectangle

Step 3

Now using Rectangle Tool (M) creating two small rectangles on the top and on the right-hand side of the box. Then, using the Direct Selection Tool (A), move the bottom corners of the rectangles so that they match with the dark grey box.

Using the direct selection tool on red rectangles

Step 4

Using the same steps above, create a pink shape at the bottom. Select all these shapes and press Control-G to Group them all together.

Creating a pink rectangle

Step 5

Create a new bright red box and use the Add Anchor Point Tool (+) to add a new anchor point on the bottom edge of the box. This will allow you to use the Direct Selection Tool (A) to pull down the bottom right corner and create a small triangle.

Creating a triangle on a square

Step 6

Now combine both shapes by placing the first group of objects on top of this one. Make sure you right click the bright red object and send it to back (Right Click > Arrange > Send to Back).

Right click send to back

Step 7

Now, with all the shapes in the correct order, select them all and Control-G to Group them. Now Duplicate the group and Flip the second group horizontally. Line them up to create the letter hole.

Combine the two halves of the letter hole

Step 8

Use the Rectangle Tool (M) to create the notice plate. To do this you can create two rectangles where one is larger than the other. Then place the smaller rectangle on top of the larger rectangle. Press Control-G to combine all the shapes together.

More rectangles for the letter hole

Step 9

Place the new group of objects on top of the post box body.

The full post box

4. How to Create the Details of the Post Box

Step 1

Using the Rectangle Tool (M) create some thin shadow lines between the shapes to add some depth to the top of the post box. Use a dark red color. You can also add a slight opacity if you want to.

Small shadows for the top of the post box

Step 2

Use the Rectangle Tool (M) again to create some dark grey grooves on the bottom of the post box.

To make an even square, draw a rectangle using the Rectangle Tool (M) while holding down the Shift key. 

Small lines on the bottom of the post box

Step 3

Select the Rounded Rectangle Tool and create a row of capsule shapes. Then Delete the bottom half of all of them using the Direct Selection Tool (A). To do this, make sure that only the bottom half anchor points have been selected before hitting the Delete button. Select them all and press Control-G to Group them all together.

Remember that you can make the corners of your rounded rectangle curvier by pressing the up or down arrow keys on your keyboard while you are drawing the shape.

Red capsules and half red capsules

Step 4

Now place the group on top of your post box to create some grooves.

Placing half red capsules on the top of the post box

5. How to Create the Royal Crown

Step 1

Now let’s create the crown! Using the Rounded Rectangle Tool, create the bottom of the crown.

Bottom of the crown

Step 2

Use the Pen Tool (P) to create the middle portion of the crown. You can use a Stroke for this and choose a thickness that you like.

Bottom and middle of the crown

Step 3

Use a combination of the Ellipse Tool and the Rectangle Tool (M) to complete the top of the crown and place it on the post box.

To create the cross of the crown, choose the Star Tool. Click and drag on the canvas to create the star, but before you release the mouse button, press the Down button on the keyboard a few times to create a triangle.

A star and a triangle

Step 4

Create a circle using the Ellipse Tool and place the triangle over it. Duplicate the triangle so that you end up with one on top and one at the bottom.

To make an even circle, draw an oval using the Ellipse Tool (L) while holding down the Shift key. 

Circle and triangles

Step 5

Select all the shapes and group them together. Duplicate this new shape and Paste it in place (Control-Shift-V). Rotate it by 90 Degrees. 

Creating a cross out of circles and triangles

Step 6

Create another circle using the Ellipse Tool and place the cross on top. Place the new cross and circle on top of the crown.

A vector crown for the post box

6. How to Create the Post Box Highlights

Step 1

Now that you have all the details on your post box, select all your shapes and press Control-G to Group everything together.

The full post box

Step 2

Press Control-C to Copy the whole group and then press Control-Shift-V to Paste it in place. With the duplicate post box selected, go to the Pathfinder panel and select Unite. This will combine all the shapes into a single shape.

The combined post box all in one colour

Step 3

Now, using the Direct Selection Tool (A), Delete half of the duplicate post box. To do this, use the mouse to click and drag the selection across only half the shape (making sure that half of the anchor points have been selected). If you have missed some points, simply select them and delete them. 

Once you have deleted half of the shape, choose a bright pink color for it using the color picker.

Half the post box is pink

Step 4

With the pink shape selected, go to Transparency and select an Opacity of 30%. Then on the drop-down menu select Overlay.

Making an overlay layer out of the half pink post box

7. How to Create a Postcard & Stamp

Step 1

For the postcard, let’s start by using the Rectangle Tool (M). Create a light grey box in the shape of a postcard. You can also create a 2 pt grey Stroke to prepare for the postcard details.

A grey rectangle

Step 2

Next, you’ll need to use the Pen Tool (P) or the Line Segment Tool (\) to create the lines of the postcard. 

Creating lines for the post card

Step 3

For the stamp, create two squares using the Rectangle Tool (M), one smaller than the other, and place them on top of each other. Then use the Ellipse Tool to create small circles around the outer square. Once that is done, select all the circles and Group them together by pressing Control-G.

Two squares and lots of circles around it

Step 4

Select both the group of circles and the white square underneath. Making sure that they are both selected, go to Pathfinder and select Minus Front.

Turning the shapes into a stamp

Step 5

Create a dashed line on top of the grey box. You can do this by Duplicating the grey box, removing the grey fill, and keeping the stroked line (as mentioned in previous steps). Then go inside the Stroke options and choose Dashed Line 4 pt

Creating a dashed line

Step 6

Select the dashed line and go to the top menu. Then select Object > Expand. Make sure both Fill and Stroke is selected. This will create shapes out of your dashed line.

Tick fill and stroke options

Step 7

Use the Direct Selection Tool (A) to select the shapes of your dashed line. Right-click and select Isolate Selected Group.

Right click and Isolate Selected Group

Step 8

You can now use the Direct Selection Tool (A) to select the shapes individually. Select the shapes you want and use the color picker to change the color.

The final post card and stamp

8. How to Create the Background

Step 1

Now it’s time to wrap up our illustration! Let’s create a New Layer for our background so that it is separate from our post box. You can do this by clicking on the New Layer button on the bottom right of the Layers tab.

Create a new layer for the background

Step 2

Create a background using a color of your choice by using the Rectangle Tool (M) and drawing it around the artboard.

Create a pink background

Step 3

Then use the Ellipse Tool to create a shadow underneath your post box.

Create the bottom shadow

Awesome! You’re Finished!

Congratulations! You have successfully completed this tutorial. Feel free to share your own creations below! I hope you found this tutorial helpful and that you’ve learned many new tips and tricks that you can use for your future illustrations. See you next time!

Vector Post Box Illustration Adobe Illustrator Tutorial

PartyBoom – balony z helem, ozdoby urodzinowe, dekoracje ślubne i weselne

BALONY Z HELEM

PartyBoom to sklep internetowy, w którym kupisz wszystko, co niezbędne do organizacji przyjęć. Wśród bogatego asortymentu sklepu znajdziesz m. in. dekoracje urodzinowe, dekoracje ślubne, dekoracje do domu, a także balony z helem. Dzięki ogromnemu wyborowi rozmaitych akcesoriów przygotujesz także idealnie wyglądający stół na przyjęcie twoich gości. PartyBoom proponuje ci talerzyki, kubki, słomki papierowe, a także pudełka na popcorn. Wszystko to doskonale sprawdzi się jako dekoracja stołu na każdej rodzinnej i nie tylko imprezie. Jeśli natomiast w najbliższym czasie planujesz ślub, wybierz oferty sklepu piękne i oryginalne dekoracje weselne. Z PartyBoom zorganizujesz także niezapomniane przyjęcie urodzinowe. Idealne dekoracje na urodziny to nie tylko balony i ozdoba stołu, twoje przyjęcie uświetnić może także oryginalna girlanda happy birthday oraz kolorowe pompony. Jeśli chcesz kupić najlepsze balony z helem Białystok to oferta PartyBoom nie ma sobie równych!

https://www.partyboom.pl/