{"id":36,"date":"2008-10-26T16:30:16","date_gmt":"2008-10-26T14:30:16","guid":{"rendered":"http:\/\/www.blackhats.es\/wordpress\/?p=36"},"modified":"2022-08-20T18:26:24","modified_gmt":"2022-08-20T16:26:24","slug":"edit-picture-picture-mode-y-artist-mode","status":"publish","type":"post","link":"https:\/\/www.blackhats.es\/wordpress\/?p=36","title":{"rendered":"edit-picture, picture-mode y artist-mode"},"content":{"rendered":"<p>Desde emacs es posible dibujar ascii arts como en cualquier editor, quiz\u00e1s esta no sea la parte m\u00e1s productiva de emacs, pero en cualquier caso lo veo interesante nombrarlo.<\/p>\n<ul>\n<li>edit-picture y picture-mode<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">El modo picture permite realizar dibujos o desplazarnos de una forma adaptada para estos dibujos, para ello debemos lanzar el modo mediante <strong>M-x edit-picture <\/strong>mientras que <strong>C-c C-c<\/strong> saldr\u00e1 de dicho modo. Las teclas de desplazamiento son las siguientes:<\/p>\n<p style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px; text-align: center;\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: baseline;\" src=\"http:\/\/www.blackhats.es\/emacs\/motiondraw.jpg\" alt=\"\" width=\"251\" height=\"220\" \/><\/p>\n<p style=\"padding-left: 30px;\">\n<p style=\"padding-left: 30px;\">Adem\u00e1s existe otro modo parecido invocado mediante <strong>M-x picture-mode<\/strong>, el cual permite realizar tareas repetitivas as\u00ed como insertar objetos pre-dise\u00f1ados. Veamos ejemplos para dicho modo:<\/p>\n<p style=\"padding-left: 30px;\"><strong>M-20 &#8211;<\/strong> : repite 20 veces el gui\u00f3n.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c . M-5 |<\/strong> : el primer comando (<strong>C-c .<\/strong>) cambiar\u00eda la direcci\u00f3n hacia abajo, mientras que el segundo (<strong>M-5 |<\/strong>) repetir\u00eda 5 veces el s\u00edmbolo pipe en dicha direcci\u00f3n.<\/p>\n<p style=\"padding-left: 30px;\">Adem\u00e1s se pueden realizar estas acciones:<\/p>\n<p style=\"padding-left: 30px;\"><strong>&lt;CR&gt;<\/strong> : se desplaza a la siguiente l\u00ednea sin crear un salto.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-open-line<\/span>&#8216;; inserta una nueva l\u00ednea.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-w n\u00famero<\/strong>: &#8216;<span style=\"color: #0000ff;\">picture-clear-rectangle-to-register<\/span>&#8216;; limpia el rect\u00e1ngulo y lo salva en el registro n\u00famero.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-u C-c C-w n\u00famero<\/strong>: elimina el rect\u00e1ngulo y lo salva en el registro n\u00famero.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-x n\u00famero<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-same-rectangle-from-register<\/span>&#8216;; inserta un rect\u00e1ngulo del registro n\u00famero.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-r<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-draw-rectangle<\/span>&#8216;; dibuja un rect\u00e1ngulo alrededor de la regi\u00f3n actual.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-y<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-yank-rectangle<\/span>&#8216;; pega un rect\u00e1ngulo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-k<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-clear-rectangle<\/span>&#8216;; borra un rect\u00e1ngulo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c TAB<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-set-tab-stops<\/span>&#8216;; asigna el <strong>TAB <\/strong>stop.<\/p>\n<p style=\"padding-left: 30px;\"><strong>M-TAB<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-tab-search<\/span>&#8216;; se desplaza a la siguiente imagen <strong>TAB<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-k<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-decr-line<\/span>&#8216;; elimina el texto de la l\u00ednea actual.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-d<\/strong> : &#8216;<span style=\"color: #0000ff;\">delete-char<\/span>&#8216;; elimina el car\u00e1cter y mueve el l texto a la izquierda.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-d<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-clear-column<\/span>&#8216;; crea un blanco en la siguiente l\u00ednea.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-p<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-move-up<\/span>&#8216;; mueve el cursor arriba.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-n<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-move-down<\/span>&#8216;; mueve el cursor abajo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-b<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-backward-column<\/span>&#8216;; mueve el cursor a la izquierda.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-f<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-forward-column<\/span>&#8216;; mueve el cursor hacia la derecha.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-b<\/strong> : &#8216;<span style=\"color: #0000ff;\">picture-motion-reverse<\/span>&#8216;; mueve el cursor en la direcci\u00f3n inversa.<\/p>\n<ul>\n<li>Artist mode<\/li>\n<\/ul>\n<ul><\/ul>\n<p style=\"padding-left: 30px;\">Con <strong>M-x artist-mode<\/strong> entraremos en dicho modo, el cual, permite insertar objetos predefinidos, as\u00ed como diversos pinceles.<\/p>\n<p style=\"padding-left: 30px;\"><strong>F10 -&gt; browsing -&gt; edit -&gt; settings -&gt;<\/strong> podemos seleccionar entre variedades de pinceles y dem\u00e1s.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-c<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-mode-off<\/span>&#8216;; sale del modo <strong>artist-mode<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-f<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-forward-char<\/span>&#8216;; mueve el cursor adelante.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-b<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-backward-char<\/span>&#8216;; mueve el cursor atr\u00e1s.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-n<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-next-line<\/span>&#8216;; mueve el cursor a la siguiente l\u00ednea.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-p<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-previous-line<\/span>&#8216;; mueve el cursor a la l\u00ednea anterior.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-o<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation<\/span>&#8216;; selecciona una operaci\u00f3n (pulsar <strong>TAB <\/strong>para obtener la lista completa).<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a f<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-flood-fill<\/span>&#8216;; selecciona flood kill.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-k<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-cut-rectangle<\/span>&#8216;; corta un rect\u00e1ngulo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a M-w<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-copy-rectangle<\/span>&#8216;; copia un rect\u00e1ngulo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-y<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-past<\/span>e&#8217;; pega un rect\u00e1ngulo.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a v<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-vaporize-line<\/span>&#8216;; elimina una l\u00ednea.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-d<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-erase-char<\/span>&#8216;; borra caracteres.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a S<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-spray-can<\/span>&#8216;; utiliza el spray.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a e<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-ellipse<\/span>&#8216;; dibuja una elipse.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a p<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-poly-line<\/span>&#8216;; dibuja poli l\u00edneas.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a r<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-rectangle<\/span>&#8216;; dibuja rect\u00e1ngulos.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a l<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-operation-line<\/span>&#8216;; dibuja l\u00edneas.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-r<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-toggle-rubber-banding<\/span>&#8216;; muestra la goma de borrar.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-l<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-line-char<\/span>&#8216;; muestra el car\u00e1cter a usar cuando se dibuja.<\/p>\n<p style=\"padding-left: 30px;\"><strong>C-c C-a C-f<\/strong> : &#8216;<span style=\"color: #0000ff;\">artist-select-fill-char<\/span>&#8216;; selecciona el car\u00e1cter para diferenciar formas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Desde emacs es posible dibujar ascii arts como en cualquier editor, quiz\u00e1s esta no sea la parte m\u00e1s productiva de emacs, pero en cualquier caso lo veo interesante nombrarlo. edit-picture y picture-mode El modo picture permite realizar dibujos o desplazarnos de una forma adaptada para estos dibujos, para ello debemos lanzar el modo mediante M-x [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[45],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-basic","tag-emacs-edit-picture-artist-mode-picture-mode"],"_links":{"self":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/36"}],"collection":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":1,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":795,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/795"}],"wp:attachment":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}