Running sketch on windows

Как использовать приложение Snip & Sketch для захвата и аннотирования скриншотов в Windows 10

Начиная с Windows 10 1809, Microsoft представила новое приложение Snip & Sketch >, которое заменяет популярный инструмент Snipping. Этот инструмент предлагает аналогичную функциональность и может использоваться для создания снимков экрана, использования таких инструментов, как ручка или карандаш, чтобы рисовать на нем, и делиться им где угодно. В этом руководстве я расскажу, как использовать приложение Snip and Sketch для захвата и аннотирования скриншотов в Windows 10.

Приложение Snip & Sketch в Windows 10

Приложение доступно в списке приложений, или вы можете найти Snip & Sketch в поле поиска Cortana. Нажмите на приложение Snip and Sketch, как только оно появится. Как только оно появится, вас приветствует сообщение «Захватывайте, делайте пометки и делитесь любым изображением».

Сделайте снимок экрана с помощью Snip & Sketch

Нажмите кнопку Новый в левом верхнем углу.

Это сведет к минимуму интерфейс и предложит вам плавающий набор инструментов, в котором вы можете использовать прямоугольный клип или клип свободной формы или полноэкранный клип .

Выберите любой из них, и если вы используете что-либо, кроме полноэкранного клипа, вы можете выбрать область, из которой вы хотите сделать снимок экрана. Держите левую клавишу, делая это. После завершения отпустите левую клавишу.

Отмеченная область теперь появится на холсте приложения Snip and Sketch.

Изображения могут быть сохранены в формате .png.

Изменить скриншот, используя Snip & Sketch

Когда у вас есть скриншот, у вас есть набор инструментов разметки, которые вы можете использовать. Обратите внимание, что как только редактор откроется, вы получите PEN для записи. Однако, если вы переместите мышь с нажатой левой кнопкой, он начнет рисовать.

1] В середине сверху у вас есть такие инструменты, как сенсорный ввод, шариковая ручка, карандаш, маркер, линейка/транспортир и инструмент кадрирования.

2] . Нажмите на нижнюю часть любого из этих инструментов, кроме Touch Writing и Crop Tool, и вы получите дополнительные опции. Здесь вы можете изменить цвет и размер пера. Когда вы нажимаете на инструмент Линейка, вы можете переключиться на Protector.

3] В левом верхнем углу вы можете сохранить, скопировать и поделиться снимком экрана.

4] . Вы также можете редактировать любые другие изображения, нажав на значок папки рядом с новой кнопкой в ​​левом верхнем углу.

Как только вы включите линейку или инструмент транспортира, он не исчезнет, ​​если вы не закроете и не запустите приложение снова.

Запустите приложение Snip & Sketch с клавишей Print Screen

Такие инструменты, как Snip и Sketch без скриншота, бесполезны, если их нельзя запустить с помощью аппаратного ключа. Хотя Print Screen захватывает снимок экрана в буфер обмена или сохраняет его в OneDrive или Dropbox при настройке, имеет смысл, если вы вместо этого сможете запустить это приложение.

Перейдите в Настройки> Удобство доступа> Клавиатура. Включите переключатель под ярлыком Print Screen, который гласит em Используйте PrtScn ‘, чтобы открыть снимок экрана.

Тем не менее, вам придется отключить настройку Print Screen с другими приложениями и перезагрузить компьютер с Windows 10, чтобы он заработал.

Запустите Snip & Sketch через CMD или Run

Введите следующую команду и нажмите Enter, чтобы открыть Snip & Sketch:

После этого нажмите кнопку «Далее» и введите подходящее имя для ярлыка. Когда закончите, нажмите кнопку Готово, чтобы создать ярлык на экране рабочего стола.

Если вы хотите добавить значок в ярлык, щелкните правой кнопкой мыши ярлык на рабочем столе и выберите «Свойства».

Затем на экране «Свойства» выберите кнопку «Изменить значок», затем в разделе «Поиск значков в этом файле» скопируйте и вставьте следующий адрес и нажмите клавишу «Ввод».

Выберите соответствующий значок, как показано на рисунке выше. Нажмите кнопку «ОК», когда закончите, и в конце нажмите кнопку «Применить», чтобы изменить значок.

Сообщите нам, как вам нравится использовать этот новый инструмент для создания снимков экрана.

How to take and annotate screenshots on Windows 10

Sometimes the easiest way to make a copy of something is to take a snapshot of your screen. While you can already capture your screen using your keyboard’s PrtScn button, you can now press Windows logo key + Shift + S to open the new modern snipping experience (also called the snipping bar), then drag the cursor over the area you want to capture.

Here are some common ways to take and annotate screenshots in Snip & Sketch on Windows 10.

Take a screenshot

Option 1: Using the Snip & Sketch app

Press the Start button and enter Snip & Sketch in the search field.

Press the New button to start snipping with the snipping bar.

The snipping bar allows you to capture the following types of snips:

Rectangular snip. Drag the cursor around an object to form a rectangle.

Free-form snip. Draw a free-form shape around an object.

Full-screen snip. Capture the entire screen.

Once you snip an area of your screen — the snipped image is added to your clipboard and you can paste it immediately in another app. A screen prompt will also allow you to annotate, save or share it using the Snip & Sketch app.

Читайте также:  Microsoft solitaire collection для windows 10 не запускается

Option 2: With the Print Screen key

While the PrtScn key already captures your full screen and sends it to your clipboard, opening the snipping bar provides you with more snipping tools you can use for precise snipping. For better control of your screen capturing options, you can opt to have your PrtScn key open the new snipping bar instead of having to type Windows logo key + Shift + S.

To turn on the new snipping feature keyboard shortcut Select Start > Settings > Ease of Access > Keyboard

Option 3: With the Window logo key + Shift + S shortcut

Pressing the S key + Windows logo + Shift keys down initiates the snipping bar at any time.

Annotate snips with Snip & Sketch

Opening images for editing with Snip & Sketch

To open an image from Snip & Sketch, select Open File or drag and drop an image from apps like File Explorer or Photos in the Snip & Sketch window.

Annotating images with Snip & Sketch

Snip & Sketch provides a few tools for annotating images, namely pen, pencil and highlighter. Once you click a tool to select it, you can click it again to change its color or thickness.

The tools work better with a pen device, but they can also be used with mouse or touch if you select the Touch Writing button icon.

Use the Eraser tool to remove specific strokes or click it twice to get the option to erase all ink.

Use the ruler or protractor tools and draw straight lines or arches.

Press the ruler/protractor button again to hide the ruler/protractor

Reside or rotate the ruler/protractor by using two finger touch gestures (if the Touch Writing button is selected) or with the mouse wheel.

Use the crop tool to crop the annotated image.

To undo cropping, select the crop tool again and press Cancel to restore the image to its full original area.

Panning the view

Some of the images you annotate might be larger than the size of the Snip & Sketch window. You can use the scroll bars to pan the view, but you can also pan the view with touch input (if the Touch Writing button is not selected) or by dragging with your mouse button while holding the Ctrl key down.

Zoom in and out of screenshots to make them easier to mark up using the magnifying glass icon. You can also zoom in and out of screenshots by pressing the Ctrl key down and tapping the + or — buttons.

Sharing and saving snips

Snip & Sketch copies the annotated snip to your clipboard when you open it and every time you make edits. Snip & Sketch allows you to save the annotated image to a file, share it or open with another app, or print it on paper or to a pdf file.

Using keyboard in Snip & Sketch

While annotating is best done using a pen or mouse — Snip & Sketch provides a lot of keyboard shortcuts you can use. Access keys are activated if you press and hold the Alt key.

Running sketch on windows

Sketch is a Common Lisp environment for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction and more. It is inspired by Processing Language and shares some of the API.

Since April 2016, Sketch is available in Quicklisp, Common Lisp’s de facto package manager. This makes getting and running Sketch as easy as

To make Sketch run correctly, though, a few requirements must be met.

Common Lisp Implementation

Sketch should be compatible with all major Common Lisp implementations and all major operating systems — more specifically, all CL implementations and operating systems that cl-sdl2 runs on. Incompatibility with any of those is considered a bug.

Sketch is known to work with:

  • CCL 1.11 on Mac OS X El Capitan
  • CCL SVN 1.12.dev.r16617 on Arch Linux
  • CCL 1.11 on Windows 10 64bit
  • SBCL on Debian Unstable
  • SBCL 1.2.16 on Arch Linux
  • SBCL 1.3.1 on Linux Mint 17
  • SBCL 1.3.6 on Windows 10 64bit

Sketch is known to not work with:

Sketch can’t handle input and the window’s titlebar is black. These kinds of issues are a known problem with Mac OS X, because it needs its GUI threads to be main, and CCL is the only lisp that accounts for that out of the box. There are ways to counter this, but until a solution finds its way into this repository, SBCL on Mac OS X will stay on this list. In the meantime, use CCL.

If you test Sketch on other systems, please send a pull request to include your results.

SDL2 is currently Sketch’s only backend. It is a C library which you will need to download manually from libsdl webpage. Select the release compatible with your operating system, or compile from the source code.

SDL2 Image & SDL2 TTF

For loading image and font files, Sketch relies on SDL2 Image and SDL2 TTF, respectively, both part of the SDL project.

Some users have reported that libffi needed to be installed to make Sketch work.

Sketch requires graphics hardware and drivers with support for GL version 3.3.

Installing and running Sketch on Windows

Sketch works on both CCL and SBCL, but installing all prerequisites might not be as straightforward as it is on the other platforms.

Читайте также:  Windows как установить mac os lion

Download SDL2, SDL2_IMAGE and SDL2_TTF dlls from libsdl webpage and copy them somewhere Windows can find them — \Windows\System32 will work. When copying SDL2_TTF, make sure to copy all of the dlls provided in the archive, and not just the TTF one.

Now you will need to get a libffi dll. One of the ways of doing this is compiling from the source, but for a quick and easy solution, you can just find a trusted source and use their version. For example, if you are using Emacs on Windows, you can find libffi-6.dll in emacs\bin . Copy it to the same directory you copied sdl2 dlls to earlier.

To bootstrap cffi-libffi, you are going to need a C compiler, more specifically the one from the GNU Compiler Collection. Also, libffi headers and pkg-config are needed. Luckily, you can get all these things (and more) with MSYS2. Go to https://msys2.github.io and follow the instructions for installing the 64bit version.

From its console, install gcc, libffi headers and pkg-config by running pacman -S gcc libffi libffi-devel pkg-config .

From the Control Panel, open System properties, go to the Advanced tab, and click “Environment Variables…” — or click the Start button, start typing “environment” and select “Edit the system environment variables”.

Double click “Path” from the list of System variables and make sure that both your lisp implementation’s path (something like C:\Program Files\Steel Bank Common Lisp\1.3.6\ ) and MSYS path (probably C:\msys64\usr\bin ) are listed. If not, click “New” and add them now.

If you needed to change anything here, restart the computer now.

If you are using SLIME, you won’t be able to load or run Sketch if you start SWANK from emacs (by running M-x slime ). Instead, you should open the Command Prompt (the regular one, not MSYS), start your lisp and eval (ql:quickload :swank) (swank:create-server) . From Emacs, type M-x slime-connect , and finally, press enter twice (for localhost and port 4005).

If you did everything correctly, you should be able to (ql:quickload :sketch) and move on to the tutorial.

If you are obtaining Sketch from this repository, instead of using Quicklisp releases

Please make sure to also get the following libraries to your local-projects directory. This is not necessary otherwise.

Running provided examples

To get a feel for what Sketch can do, and also to make sure that everything has been installed correctly, you can look at the examples. The code below will run all four currently provided examples at once. Note that on older machines running four sketches at once might result in a small degradation in performance, so you might want to run sketches separately.

Running example code from this page

In all the following examples, we’re going to assume that Sketch is loaded with (ql:quickload :sketch) , and that we’re in package :TUTORIAL , which is set to use :SKETCH .

NOTE: This tutorial is using the revised DEFSKETCH macro, introduced in May 2016. Until this release hits Quicklisp, you’ll have to install Sketch manually to your local-projects directory, along with https://github.com/lispgames/cl-sdl2 and https://github.com/lispgames/sdl2kit. More about this here.

Defining sketches is done with the DEFSKETCH macro, that wraps DEFCLASS . Using DEFCLASS is still possible, but DEFSKETCH makes everything so much easier, and in these examples, we’re going to pretend that’s the only way.

If all goes well, this should give you an unremarkable gray window.

Let’s draw something!

Grayscale imagery is nice, but let’s add color and make our sketch more vibrant. Assuming that you’re using Emacs + SLIME, or a similarly capable environment, you can just re-evaluate with the following code:

The window becomes yellow. There are a couple of things to note. Drawing code doesn’t need to go into a special function or method, or be binded to a sketch explicitly. DEFSKETCH is defined as (defsketch sketch-name bindings &body body) : that body is your drawing code. We will get to BINDINGS later. The other thing is that Sketch comes with its own color library.

There are constants for commonly used colors: +RED+ , +GREEN+ , +BLUE+ , +YELLOW+ , +MAGENTA+ , +CYAN+ , +ORANGE+ +WHITE+ , and +BLACK+ .

If you want to be more specific about the colors you want, you are welcome to use (rgb red green blue &optional (alpha 1.0)) , (hsb hue saturation brightness &optional (alpha 1.0)) or (gray amount &optional (alpha 1.0)) . The arguments to these functions are values from 0 to 1. You can use these functions in the same way you just used +YELLOW+ . Hopefully the function names and their arguments are self-explanatory, but if not, you can learn about the RGB color model here and about HSB (also called HSV) here. (gray amount &optional (alpha 1.0)) is really just a convenient alias for (rgb amount amount amount &optional (alpha 1.0)) , and can be used for brevity when a shade of gray needs to be defined.

This might be a good place to note that function names in Sketch use the American English spellings, like “gray” and “color”. It’s just a choice that needed to be made, in pursue of uniformity and good style.

This will give you a lighter yellow.

All functions have an additional, ALPHA parameter. It determines the amount of transparency that the color should have.

RGB-255, HSB-360, GRAY-255

Sometimes it’s easier to think about color values in non-normalized ranges. That’s why Sketch offers RGB-255 , HSB-360 , and GRAY-255 .

Читайте также:  Основные понятия файловой системы windows

This is how these functions map to their normalized variants.

(rgb-255 r g b a) (rgb (/ r 255) (/ g 255) (/ b 255) (/ a 255))
(hsb-360 h s b a) (hsb (/ h 360) (/ s 100) (/ b 100) (/ a 255))
(gray-255 g a) (gray (/ g 255) (/ a 255))

HSB-360 is using different ranges, because hue is represented in degrees (0-360), and saturation and brightness are represented as percentages (0-100).

If you are used to working with colors in hex, like in CSS, you can use (hex-to-color string) , where STRING is the color in one of the following formats: “4bc”, “#4bc”, “4bcdef”, and “#4bcdef”.

If you don’t care about fiddling with the exact values, but still need different colors, you can use one of the following functions.

(lerp-color (start-color end-color amount &key (mode :hsb)))

Lerping is a fancy way of saying linear interpolation. This function takes the starting color and the ending color, and returns the color between them, which is an AMOUNT away from the starting color. When AMOUNT equals zero, the returned color equals the starting color, and when AMOUNT equals one, the ending color is returned. Amounts between zero and one give colors that are “in-between”. These colors are calculated according to the specified MODE , which is :HSB by default, meaning that the resulting color’s hue is between the starting and ending hue, as is the case with its saturation and brightness.

(random-color (&optional (alpha 1.0)))

Returns a random color. You probably don’t want to use this, because much of the returned colors are either too dark, or too light. You do get to choose the ALPHA value, though.

(hash-color (n &optional (alpha 1.0)))

This is probably the function you’re looking for, if you just want to create a non-repeating set of colors quickly. It maps all numbers to “interesting” (not too dark, not too light) colors. You can use this for coloring procedurally generated objects, when prototyping and just trying to make things look different quickly, when making palettes, looking for “the right” color, and many other things.

Sometimes you have a color, and would like to transform it in some way. That’s what color filters are for.

To convert colors to grayscale, you can use color-filter-grayscale . Two modes of grayscale conversion are implemented:

  • :luminosity , the default, which is luminance-preserving
  • :average , which sets all color channels to their average

To invert a color, use color-filter-invert :

Rotating a color in Sketch using color-filter-rotate sets the value of its red channel to the previous value of the green channel; green to blue, and blue to red. The operation is intended to be used in palette generation, because the rotated colors usually work pretty well together.

HSB stands for Hue/Saturation/Brightness. You can use color-filter-hsb to adjust hue, saturation and brightness of an existing color.

Pens are used to draw shapes. If no pen is specified, the default pen sets :fill to white, :stroke to black, and weight to 1.

Creating and Using Pens

Say you want to draw a red square and a blue circle. You would need to use two different pens.

The squares in the previous example were filled because we specified the :fill property in make-pen . If we wanted to just draw the outline of the square, we would use :stroke like this:

We can also change the thickness of the lines and shapes that we draw by changing the pen :weight .

:curve-steps is used to change the smoothness (resolution) of curves like #’bezier .

Made with Sketch

I’m trying to compile my defsketch definition, but it keeps telling me that :TITLE (or :WIDTH, :HEIGHT, etc.) is not of the expected type LIST. Why is this happening?

You’re probably trying to use the old way of defining sketches — (defsketch name window-parameters slot-bindings &body body) . DEFSKETCH has been changed to (defsketch name bindings &body body) . It’s still possible to define the title and other window parameters, though.

For more, read about “Bindings” in the tutorial above.

For everything else, read the code or ask vydd at #lispgames.

Go make something pretty!

Copyright (c) 2015, 2016, 2017 Danilo Vidovic (vydd)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.

Оцените статью