• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JavaScript, Canvas рисование текста в пиксели?

Community Beginner ,
Mar 12, 2017 Mar 12, 2017

Copy link to clipboard

Copied

вот код, в формате javascript :

var mask = new createjs.Shape();

        mask._off = true;

        mask.graphics

            .p("AEMCVIgHgEIgGgFQgCgEAAgDIACgHIADgFIAGgEIAHgBIAIABIAKAFIAHABQAFAAADgDIAHgHIAFgIIAPggIhPiQIAjAAIA7BsIAwhsIAQAAIhOCyQgFALgGAIQgHAIgHAGQgHAFgHADQgIACgHAAgAh8CQIAAjXIAeAAIAAAfIAKgMIANgLQAGgFAJgDQAIgDAKAAQANAAALAFQALAGAGAKQAIAKAEANQAEANAAAPQAAARgFAQQgFAQgJALQgIAMgOAGQgOAHgRAAIgMgBIgKgCIgKgDIgJgFIAABIgAhBg0IgLAGIgKAIIgIAJIAABDQAAAHADAGQADAHAFAEQAGAFAHACQAIADAJAAQAIAAAIgEQAHgFAGgIQAFgIAEgLQADgLAAgNQAAgPgDgNQgDgNgFgIQgGgIgHgFQgHgEgJAAQgHAAgGACgACCBQQgIgDgFgFQgFgFgDgHQgCgHAAgIQAAgKAEgIQAEgIAGgGQAHgGAJgFIATgHIAqgMIAAgKQAAgKgCgHQgCgIgEgEQgEgEgFgCQgGgCgGAAQgIAAgFACQgFACgCADQgDADgBAFIgCAQIgCAGIgFAFQgDABgEAAIgHgBIgFgEIgDgFIgBgIQAAgHAFgHQAFgGAIgFQAIgFAMgCQALgDAMAAQAPAAALADQAKADAHAFQAGAFADAIQADAHAAAJIAAByIgfAAIAAgVIgWAQQgGAEgHACQgHACgKAAQgJAAgHgDgACrACIgNAHIgLAIIgHAJQgDAFAAAGQAAAFACAGQACAFAEADQADAEAFACQAEADAFAAIAKgCIAJgDIARgMIAAg3gAj+BNQgOgGgKgKQgKgKgGgNQgGgOAAgPQAAgQAFgQQAGgQAKgLQAJgLAOgHQAOgGARAAQAPAAANAFQAMAFAJAJQAJAJAFAMQAFALAAANIhyAAQAAAOAEANQAEANAHAJQAHAKAKAFQAKAGAMAAQAKAAAJgDQAJgEAIgFQAHgFAFgHQAFgHADgHIAIAEQgDAMgHAKQgIALgJAHQgKAIgMAFQgLAEgMAAQgQAAgNgGgAjDgWQAAgJgDgHQgDgIgFgFQgGgGgHgDQgHgDgIAAQgHAAgGADQgHADgFAGQgFAFgDAIQgDAHgBAJIBMAAIAAAAgAAxBQIAAjdIAWgIIAIAAIAADlgAmZBQIAAiXIAeAAIAAAdIAJgNIALgKIALgHQAGgCAGAAIAKABIAHAEIAFAGQACADAAAEQAAAHgEAEQgFAEgIAAIgJgBIgKgFIgHgBIgGACIgGAFIgGAHIgGAKIAABog");

        mask.setTransform(75, 55);

вот в чём загвоздка, не пойму, какой шифр здесь. именно этот длинный код:

AEMCVIgHgEIgGgFQgCgEAAgDIACgHIADgFIAGgEIAHgBIAIABIAKAFIAHABQAFAAADgDIAHgHIAFgIIAPggIhPiQIAjAAIA7BsIAwhsIAQAAIhOCyQgFALgGAIQgHAIgHAGQgHAFgHADQgIACgHAAgAh8CQIAAjXIAeAAIAAAfIAKgMIANgLQAGgFAJgDQAIgDAKAAQANAAALAFQALAGAGAKQAIAKAEANQAEANAAAPQAAARgFAQQgFAQgJALQgIAMgOAGQgOAHgRAAIgMgBIgKgCIgKgDIgJgFIAABIgAhBg0IgLAGIgKAIIgIAJIAABDQAAAHADAGQADAHAFAEQAGAFAHACQAIADAJAAQAIAAAIgEQAHgFAGgIQAFgIAEgLQADgLAAgNQAAgPgDgNQgDgNgFgIQgGgIgHgFQgHgEgJAAQgHAAgGACgACCBQQgIgDgFgFQgFgFgDgHQgCgHAAgIQAAgKAEgIQAEgIAGgGQAHgGAJgFIATgHIAqgMIAAgKQAAgKgCgHQgCgIgEgEQgEgEgFgCQgGgCgGAAQgIAAgFACQgFACgCADQgDADgBAFIgCAQIgCAGIgFAFQgDABgEAAIgHgBIgFgEIgDgFIgBgIQAAgHAFgHQAFgGAIgFQAIgFAMgCQALgDAMAAQAPAAALADQAKADAHAFQAGAFADAIQADAHAAAJIAAByIgfAAIAAgVIgWAQQgGAEgHACQgHACgKAAQgJAAgHgDgACrACIgNAHIgLAIIgHAJQgDAFAAAGQAAAFACAGQACAFAEADQADAEAFACQAEADAFAAIAKgCIAJgDIARgMIAAg3gAj+BNQgOgGgKgKQgKgKgGgNQgGgOAAgPQAAgQAFgQQAGgQAKgLQAJgLAOgHQAOgGARAAQAPAAANAFQAMAFAJAJQAJAJAFAMQAFALAAANIhyAAQAAAOAEANQAEANAHAJQAHAKAKAFQAKAGAMAAQAKAAAJgDQAJgEAIgFQAHgFAFgHQAFgHADgHIAIAEQgDAMgHAKQgIALgJAHQgKAIgMAFQgLAEgMAAQgQAAgNgGgAjDgWQAAgJgDgHQgDgIgFgFQgGgGgHgDQgHgDgIAAQgHAAgGADQgHADgFAGQgFAFgDAIQgDAHgBAJIBMAAIAAAAgAAxBQIAAjdIAWgIIAIAAIAADlgAmZBQIAAiXIAeAAIAAAdIAJgNIALgKIALgHQAGgCAGAAIAKABIAHAEIAFAGQACADAAAEQAAAHgEAEQgFAEgIAAIgJgBIgKgFIgHgBIgGACIgGAFIgGAHIgGAKIAABog

который означает "replay"

Пример работы кода :http://jsfiddle.net/ogzr3y5v/8/

может у кого нибудь есть генератор такова шифра или статьи по этой теме

Cпaсибо большое за внимание !

Views

506

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 13, 2017 Mar 13, 2017

If you create a new HTML5 Canvas FLA, and use the brush tool to draw a new shape, then publish that, in the .js file you will see the decodePath string. I tried it by drawing a blob and replacing your jsfiddle example with the code from my blob. It worked well, and drew several copies of my blob. Here the data I used (watch out for any spaces, they should be removed):

AgdGuIgWgDIgKgCIgKgCIgKgDIgLgDIgRgEIgPgIIgNgHIgMgIIgKgIIgMgHIgLgHIgMgIIgKgHIgMgIIgLgIIgMgHIgKgHIgPgIIgMgHIgKgIIgIgIIgFgHIgFgHIgIgI

...

Votes

Translate

Translate
Adobe Employee ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Yes, the Canvas publishing from Animate produces Text as vector shapes when you use Static Text in your project.

If you change the text field type to Dynamic text, it is published as editable text itself.

Know more about it here: Create HTML5 Canvas documents in Animate CC | Static Vs Dynamic Text

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

I unmarked Nipun's message as being correct because the topic has nothing to do with text. The example graphic mask just happens to look like a word.

nikog, see this page, it converts images to Base64, which is what I think the code is:

Base64 Image Encoder

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

By the way, I may end up being wrong, I couldn't convert the code back into an image. I'm checking what other format it might be.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Ok, I'm on the right lines now! The code is a decodePath, which is I think Base64 encoded coordinates to draw the shape. I didn't find an encoder yet, except one from Google that is used in their maps. Anyway, read about decodeaPath here:

EaselJS v0.8.2 API Documentation : Graphics

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

....eventually no longer a generator so text?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

If you create a new HTML5 Canvas FLA, and use the brush tool to draw a new shape, then publish that, in the .js file you will see the decodePath string. I tried it by drawing a blob and replacing your jsfiddle example with the code from my blob. It worked well, and drew several copies of my blob. Here the data I used (watch out for any spaces, they should be removed):

AgdGuIgWgDIgKgCIgKgCIgKgDIgLgDIgRgEIgPgIIgNgHIgMgIIgKgIIgMgHIgLgHIgMgIIgKgHIgMgIIgLgIIgMgHIgKgHIgPgIIgMgHIgKgIIgIgIIgFgHIgFgHIgIgIIgFgHIgEgIIgIgIIgFgHIgHgHIgGgIIgEgHIgGgIIgHgIIgFgHIgFgHIgIgIIgEgHIgGgIIgEgIIgIgHIgFgHIgCgIIgGgHIgCgIIgCgIIgDgHIgDgHIgEgIIgDgHIgDgIIgCgIIgCgHIgDgHIgDgIIgCgHIgDgIIAAgIIAAgHIgCgHIAAgIIAAgGIAAgIIAAgIIAAgHIAAgHIAAgIIAAgHIAAgIIAAgIIAAgHIAAgHIAAgIIAAgHIAAgIIAAgIIACgHIAAgHIAAgIIAAgHIADgIIAAgIIAAgHIACgHIAAgIIADgHIAAgIIADgIIAAgHIACgHIACgIIADgHIAFgIIACgIIAGgHIACgHIAFgIIADgHIAEgIIADgIIAFgHIAFgHIAFgIIAFgHIAIgIIAKgIIAMgHIANgHIAHgIIAPgHIAKgGIAHgCIAKgCIAXgDIBTgFIAMgIIAKgHIAPgIIARgHIAXgHIARgGIAXAAIAAgCIBFAAIAWACIAQAGIARAHIAPAHIAPAIIANAHIAMAIIAIAIIAHAHIAHAHIAGAIIAFAHIAHAIIAFAIIAFAHIAFAHIAFAFIAAADIANADIAPAEIARAIIAPAIIAPAHIAPAHIAPAIIAPAHIAMAIIANAIIAKAHIAKAHIAKAIIAKAHIAIAIIAHAIIAIAHIAEAHIAIAIIAFAHIAFAIIACAIIAGAHIACAHIADAIIAEAHIADAIIADAIIAEAHIAGAHIACAIIAFAHIADAIIAEAIIADAHIAAAHIADAIIAAAHIAAAIIACAIIAAAHIAAAHIAAAHIAAAHIAAAIIAAAIIAAAHIAAAHIAAAIIAAAHIAAAIIAAAIIAAAHIAAAHIAAAIIAAAHIAAAIIAAAIIAAAHIAAAHIAAAIIAAAHIAAAIIgCAIIAAAHIAAAHIgDAIIgDAHIgCAIIgCAIIgDAHIgDAHIgEAIIgDAHIgFAIIgFAIIgFAHIgFAHIgIAIIgHAHIgHAIIgIAIIgFAHIgFAHIgFAIIgIAHIgHAIIgHAIIgKAHIgNAHIgPAIIgPAHIgKAIIgKAIIgKAHIgNAHIgMAIIgUAHIgPAGIgIACIgJACIgXADIi9AAg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

Thanks a lot, I looked at 10 forums for an answer to the question and nobody knew. Respect !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 13, 2017 Mar 13, 2017

Copy link to clipboard

Copied

As a point of interest, I didn't know either! But I'm very good with Google, and knew enough to know what to look for.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

I want to ask you something, when I write text there he pundit on different shape, how can I put it to be just a shape

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

Type some text into a textfield, then select the textfield and do Break Apart twice. That will convert the text into shape data. When you publish that the Javascript should give you the decodePath text for all of the letters in one chunk.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 15, 2017 Mar 15, 2017

Copy link to clipboard

Copied

LATEST

Many thanks !

Props to soccermomof1: Genius!

1398983350.png
You're a genius! Thank you man !


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines